blakeembrey / javascript-stringify

Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`
MIT License
140 stars 16 forks source link

TypeError: Cannot read property 'split' of undefined #4

Closed zalmoxisus closed 8 years ago

zalmoxisus commented 8 years ago

Hey @blakeembrey,

It seems you reverted my pr in https://github.com/blakeembrey/javascript-stringify/commit/77add2892fd4eedaaeae77405bb5b4cbecf1ef9d.

The problem is that value is not undefined, but stringify(value) is.

blakeembrey commented 8 years ago

Thanks. I would have added tests, but I got lazy with everything going on. I'll add a test next time.

blakeembrey commented 8 years ago

Tests added with https://github.com/blakeembrey/javascript-stringify/commit/36ac373b782b9b1b4503dc4f3caef0b7a800998f. I'll have to ask for those in the future to avoid dumb mistakes like this 😄