Skip to content

Commit 9a0c0a3

Browse files
committed
Fix compare function (ocsigen#1729)
1 parent 56bb9e8 commit 9a0c0a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/js/compare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function caml_compare_val_number_custom(num, custom, swap, total) {
6161
if (comp) {
6262
var x = swap > 0 ? comp(custom, num, total) : comp(num, custom, total);
6363
if (total && Number.isNaN(x)) return swap; // total && nan
64-
if (Number.isNan(+x)) return +x; // nan
64+
if (Number.isNaN(+x)) return +x; // nan
6565
if ((x | 0) !== 0) return x | 0; // !nan
6666
}
6767
return swap;

0 commit comments

Comments
 (0)