mirror of
https://github.com/amark/gun.git
synced 2025-06-06 14:16:44 +00:00
NaN -> false (#1201)
This commit is contained in:
parent
05f497778a
commit
666569f1d7
2
gun.js
2
gun.js
@ -142,7 +142,7 @@
|
|||||||
// we want +/- Infinity to be, but JSON does not support it, sad face.
|
// we want +/- Infinity to be, but JSON does not support it, sad face.
|
||||||
// can you guess what v === v checks for? ;)
|
// can you guess what v === v checks for? ;)
|
||||||
("number" === typeof v && v != Infinity && v != -Infinity && v === v) ||
|
("number" === typeof v && v != Infinity && v != -Infinity && v === v) ||
|
||||||
(v && "string" == typeof v["#"] && Object.keys(v).length === 1 && v["#"]);
|
(!!v && "string" == typeof v["#"] && Object.keys(v).length === 1 && v["#"]);
|
||||||
}
|
}
|
||||||
})(USE, './valid');
|
})(USE, './valid');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user