Closed spig closed 11 years ago
Good catch. I'll look for a NodeJS equivalent and add a check for window.
Hopefully you can just pull the changes in through my pull request.
Steve
On Sun, May 12, 2013 at 7:16 AM, adamfowleruk notifications@github.comwrote:
Good catch. I'll look for a NodeJS equivalent and add a check for window.
— Reply to this email directly or view it on GitHubhttps://github.com/adamfowleruk/mldb/issues/34#issuecomment-17777782 .
Unfortunately I had already done a bunch of core changes to MLDB. I've manually merged in your fixes though. Thanks very much for your efforts.
I am not sure about how everything should work, but I've noticed that the function textToXML uses the window object without checking if it's defined. Other places in the file the window object is checked before use so I attempted to do the same in my fork.
If the window object is undefined then the parsing is unable to occur. I have added jsdom to allow parsing when window is not defined.
Is there another fix that would be better?