Skip to content

prettyPrinter: handle null prototype and nullish toString

Gary Li requested to merge li-gary/gjs:handle-nullish-tostring into master

GJS prettyPrint currently throws if toString does not exist for an object or its prototypes. This includes cases where the object has null prototype or if the user intentionally overrode toString.

Check if toString exists and additionally let the user know about null prototype on an object.

Fixes #626 (closed)

Merge request reports

Loading