Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

TypeError: Cannot read property 'toString' of null #488

Closed
stremovskyy opened this issue Mar 6, 2018 · 5 comments
Closed

TypeError: Cannot read property 'toString' of null #488

stremovskyy opened this issue Mar 6, 2018 · 5 comments
Labels

Comments

@stremovskyy
Copy link

Using OSM Bright theme

carto project.mml > OSMBright.xml                                                                      
TypeError: Cannot read property 'toString' of null
    at Util.jsonToXML (/usr/local/lib/node_modules/carto/lib/carto/util.js:172:24)
    at Util.jsonToXML (/usr/local/lib/node_modules/carto/lib/carto/util.js:137:36)
    at /usr/local/lib/node_modules/carto/lib/carto/util.js:159:33
    at Array.map (native)
    at Util.jsonToXML (/usr/local/lib/node_modules/carto/lib/carto/util.js:158:29)
    at Util.jsonToXML (/usr/local/lib/node_modules/carto/lib/carto/util.js:137:36)
    at /usr/local/lib/node_modules/carto/lib/carto/util.js:159:33
    at Array.map (native)
    at Util.jsonToXML (/usr/local/lib/node_modules/carto/lib/carto/util.js:158:29)
    at Util.jsonToXML (/usr/local/lib/node_modules/carto/lib/carto/util.js:137:36)
@nebulon42
Copy link
Collaborator

I can confirm this. The obvious fix is not to transform the object into a string if it is null. I still have to check if this is just a symptom of something else that goes wrong. Thanks for reporting.

@nebulon42
Copy link
Collaborator

The fix is now in master. @Karmadon could you try if master produces a functioning XML for you?

@wkunker
Copy link

wkunker commented May 18, 2018

@nebulon42 That fixed it for me.

@stremovskyy
Copy link
Author

@nebulon42 fixed THX!

@nebulon42
Copy link
Collaborator

Great, so I'll release 1.0.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants