You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the first condition evaluates to false (the correct value to be returned) it evaluates the second, which looks for a string key that doesn't exist, returning nil.
I have a branch with a spec to recreate and a suggested fix (remove the second OR condition) that I'd be happy to open a PR for to discuss or get feedback ✌️
The text was updated successfully, but these errors were encountered:
hey team! we found a bug in the serialization of boolean
false
values as follows:To recreate:
The output of
.render
is:"{\"id\":1,\"active\":null}"
It is coming from the
extract
method ofHashExtractor
https://github.com/procore/blueprinter/blob/f2415a3fa0ec835ac12cf39d92974eae14ca879b/lib/blueprinter/extractors/hash_extractor.rb#L1-L7
Because the first condition evaluates to
false
(the correct value to be returned) it evaluates the second, which looks for a string key that doesn't exist, returningnil
.I have a branch with a spec to recreate and a suggested fix (remove the second OR condition) that I'd be happy to open a PR for to discuss or get feedback ✌️
The text was updated successfully, but these errors were encountered: