Open p-himik opened 3 years ago
=> (oget #js {:constructor nil, :a 1} :a) TypeError: Cannot read properties of null (reading 'prototype') at Object.oops$helpers$is_prototype_QMARK_ [as is_prototype_QMARK_] (helpers.cljs:7) at Object.oops$helpers$cljs_type_QMARK_ [as cljs_type_QMARK_] (helpers.cljs:19) at Object.oops$core$validate_object_access_dynamically [as validate_object_access_dynamically] (core.cljs:39) at eval (views.cljs:308)
The culprit seems to be this function:
(defn is-prototype? [o] (identical? (.-prototype (.-constructor o)) o))
Perhaps it should check if (.-constructor o) is not null?
(.-constructor o)
null
The culprit seems to be this function:
Perhaps it should check if
(.-constructor o)
is notnull
?