You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using xml2js, which uses sax-js, to save and load a xml file to a server with Angular 5. I encountered a problem with char & in an angular production environment only.
I have a text field with value 'a & b', which is saved to the server as a & b using xml2js. When loading the data from the server, it works on a local environment. However, on a production server, it will complain that "Cannot read property 'toLowerCase' of undefined" with the following code.
The err in the above code shows stack trace of minified code.
TypeError: Cannot read property 'toLowerCase' of undefined
at L (sax.js:913)
at o.write (sax.js:1485)
at h.parseString (parser.js:322)
at h.parseString (parser.js:5)
at e.fromXML (xml.service.ts:52)
line 912 of sax.js shows parser.entity returns null, though on local environment, it is 'amp'
Any help will be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Thanks ! This helped me a lot.
I had a problem with a Vue application that uses xlsx-populate.
Webpack build was running without errors, but at runtime I had a ReferenceError in sax.
Forcing uglifyjs-webpack-plugin to use the latest version of uglify-es solved my problem.
I am using xml2js, which uses sax-js, to save and load a xml file to a server with Angular 5. I encountered a problem with char & in an angular production environment only.
I have a text field with value 'a & b', which is saved to the server as
a & b
using xml2js. When loading the data from the server, it works on a local environment. However, on a production server, it will complain that "Cannot read property 'toLowerCase' of undefined" with the following code.The err in the above code shows stack trace of minified code.
line 912 of sax.js shows parser.entity returns null, though on local environment, it is 'amp'
Any help will be greatly appreciated.
The text was updated successfully, but these errors were encountered: