Skip to content

Commit 0cd68d2

Browse files
committed
do not mutate the root object
1 parent f033bc3 commit 0cd68d2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,10 +1483,18 @@
14831483
IMeta
14841484
(-meta [_] nil))
14851485

1486+
(defn- root-obj
1487+
[]
1488+
(->> js/Function
1489+
(.getPrototypeOf js/Object)
1490+
(.getPrototypeOf js/Object)))
1491+
14861492
(extend-type default
14871493
IHash
14881494
(-hash [o]
1489-
(goog/getUid o)))
1495+
(if (identical? o (root-obj))
1496+
0
1497+
(goog/getUid o))))
14901498

14911499
(extend-type symbol
14921500
IHash

0 commit comments

Comments
 (0)