Steve Goldberg
10/24/2019, 1:55 PMUncaught SyntaxError: Unexpected token u in JSON at position 0
https://developers.suitecommerce.com/til-thursday-troubleshooting-uncaught-syntaxerror-unexpected-token-u-in-json-at-position-0Chris
10/24/2019, 6:44 PMdata = data.substring(0, '<!--')
It's a bit of a hack, but it chops off the offending HTML.Chris
10/24/2019, 6:46 PMJSON.parse(JSON.stringify(stuff));
the hard way and scratched me head for a few hours before stumbling on the right answer.Steve Goldberg
10/25/2019, 9:27 AMThe fix ending up beingThat is amazing. I'm not seen that one beforedata = data.substring(0, '<!--')
Steve Goldberg
10/25/2019, 9:28 AMI ran into theI loved this when I found out about it. I was writing some hacky stuff to experiment with the application and really wanted to deeply copy a model but ourJSON.parse(JSON.stringify(stuff));
deepCopy()
utility function is explicitly set up to disallow this