Bug toJson fails for nullish values

Code:
> js toJson({ x: null })

Unexpected error, debug log printed.

> js toJson({ x: undefined })

Unexpected error, debug log printed.
Debug log attached
 

Attachments

  • DEBUG_20240703.txt
    10.5 KB · Views: 1

heeheehee

Developer
Staff member
IMO, debug logs should not be generated by a script unless there really is a bug in Mafia.

That said, my inclination would be to make any function call from JS to ASH that passes an unrepresentable value to throw a JS exception, rather than passing null to some ASH function (whether user-defined or built-in) that probably can't handle it.
 
Top