Printing an Object with a null prototype throws an error

Description

ClojureScript doesn't handle printing objects with a null prototype:

1 2 (prn (.create js/Object nil)) ;;throws Uncaught TypeError: Cannot read property 'cljs$lang$ctorStr' of undefined (str (.create js/Object nil)) ;;throws Uncaught TypeError: Cannot convert object to primitive value

For the first case, it looks like pr-writer-impl's last case needs a separate check for a nil object constructor. I've not yet investigated the second case.

Environment

None

Status

Assignee

David Nolen

Reporter

Jonathan Boston

Labels

None

Approval

Accepted

Patch

None

Fix versions

Affects versions

1.9.293

Priority

Minor