marklogic-community/pipes

[BUG] Map Values is not working when it receives NULL as input

Closed this issue · 2 comments

In some scenarios,we don't have data for the mapped one's so in that case input value is null.

To Reproduce
Steps to reproduce the behavior:
1.Attachedzip file,which has sample graphs to reproduce it.
2. No need to ingest any data to test this scenario.
Graph_Errors.zip

Error1 :
Error during graph execution. Check the log for details: Cannot read property 'toString' of null
Error2: when we use lookup data as input
Error during graph execution. Check the log for details: Cannot read property 'toString' of undefined

Default input is also not working. In addition casting is not working ok. Will fix this as well.

Cast to bool -> cast to bool or false in case can't be casted
Cast to number -> cast to number or -1 in case NaN

shipping 2.0.1