spel2js
spel2js copied to clipboard
object.property throws null pointer exception.
object.property throws null pointer exception when object is defined and there is no property. Ideally it should not throw an exception instead return null or undefined.
example: let obj = {a: 1, b: 2} is present in the context and when I try to evaluate the expression like "obj.c == 3 ? true : false" it throws null pointer exception.
I can see nullSafeNavigation is false for me. is there a way I can make it true so that it returns null.
Can you try obj?.c == 3 or obj.c? == 3?
I had that problem too. What I had to do is to manually check for the property before its evaluation and set obj.c = null.
This library still has a lot of things to improve. But it seems pretty dead :/