Closed
Description
I recently upgraded to 1.3.1 so I could use this library with Typescript, but it seems like what used to fail gracefully is now blowing up.
If I have an object like:
{
id: 1234,
employee: null,
created_on: 2021-05-11
}
With 1.2.0 - if I tried to get the field "/employee/st_price" - it would fail gracefully and return undefined
With 1.3.1 - it blows up saying it can't find "st_price" in null
Uncaught TypeError: Cannot read property 'st_price' of null
at JsonPointer.eval (eval at compilePointerDereference (util.js?06b3:1), <anonymous>:5:17)
at JsonPointer.get (pointer.js?05e6:131)
at Function.get (pointer.js?05e6:81)
....