dataobject-parser icon indicating copy to clipboard operation
dataobject-parser copied to clipboard

TypeError: Cannot read property 'propertyIsEnumerable' of undefined

Open skidvd opened this issue 7 years ago • 1 comments

TypeError: Cannot read property 'propertyIsEnumerable' of undefined at DataObjectParser.get (dataobject-parser.js:115)

Our data model uses undefined (vs. null) intentionally. null denotes an intentional absence of value, while undefined has not yet been determined or not yet available.

line 114 of the dataobject-parser.js script appears to check for null, but does not handle undefined, yielding the above error in case of the undefined value. Any reason it could not check for and correctly handle both null and undefined? In the case of undefined, I'd expect to receive undefined as the return value from the .get() call.

skidvd avatar Mar 02 '18 17:03 skidvd

Can you verify this is what you're looking for? Also if you can help to write some more tests to avoid any edge cases I've missed much appreciated!

https://github.com/henrytseng/dataobject-parser/pull/11

henrytseng avatar Jun 23 '18 18:06 henrytseng