cannot read property 'replace' of undefined

When I am trying to add data to my database, I get the error "cannot read property of ‘replace’ of undefined. How do I fix this? Thanks in advance for any help.

You’re trying to replace an undefined item?

Same problem here, the same problem raised before: GitHub · Where software is built. But the solution link from the answer is not found, so I am stuck on this problem for more than 1 hour.

Mi, my son fixed this by writing a bit of code. I’ll have him tell me what exactly he did when he gets home from work and put it here so you can fix yours if you don’t have it already.

Please share your code so we can assist you.

That will be really helpful! Thanks in advance

From online discussion, this relates to a problem of react library with xcode installation, that is a problem only occurred in Mac. It doesn’t relate to any code in WIX