Skip to content

Commit 8c7e82c

Browse files
authored
Merge pull request #28 from lambdaisland/alys/fix-round-trip
Fix round-trip test
2 parents 3463a3d + 5d3b97b commit 8c7e82c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/lambdaisland/deep_diff2/diff_test.cljc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@
199199
;; (not= ##NaN ##NaN), which messes up test results
200200
;; https://stackoverflow.com/questions/16983955/check-for-nan-in-clojurescript
201201
(defn NaN? [node]
202-
#?(:clj false
202+
;; Need to confirm that it's a Double first.
203+
#?(:clj (and (instance? Double node) (Double/isNaN node))
203204
:cljs
204205
(and (= (.call js/toString node) (str "[object Number]"))
205206
(js/eval (str node " != +" node )))))

0 commit comments

Comments
 (0)