In the implementation of
core.cljs, the first possibility the code checks is whether an object was created with
defrecord. It does so by inspecting the
This leads to code errors when printing these objects in ClojureScript, including at the REPL, and renders the REPL largely unusable when working on objects produced by such libraries.
It is not possible to work around this limitation in client code in the general case, because the check occurs prior to the check for alternative protocols such as
Suggested fix: rather than testing only for the "truthiness" of the
cljs$lang$type property, test for a particular value or type of value such that the condition will not evaluate to true for
Proxy objects which respond to arbitrary property lookups with an arbitrary value.