mirror of
https://github.com/flynx/diff.js.git
synced 2025-10-30 11:30:09 +00:00
added NaN special case...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a7573e8f19
commit
3be394b85d
4
diff.js
4
diff.js
@ -1393,6 +1393,8 @@ module.Types = {
|
|||||||
// NOTE: we can't use a == b directly because of things like
|
// NOTE: we can't use a == b directly because of things like
|
||||||
// [2] == 2 -> true...
|
// [2] == 2 -> true...
|
||||||
return a === b
|
return a === b
|
||||||
|
// special-case: NaN...
|
||||||
|
|| (isNaN(a) && isNaN(b))
|
||||||
// basic patters...
|
// basic patters...
|
||||||
|| a === that.ANY
|
|| a === that.ANY
|
||||||
|| b === that.ANY
|
|| b === that.ANY
|
||||||
@ -1515,6 +1517,8 @@ module.Types = {
|
|||||||
// NOTE: we can't use a == b directly because of things like
|
// NOTE: we can't use a == b directly because of things like
|
||||||
// [2] == 2 -> true...
|
// [2] == 2 -> true...
|
||||||
return a === b
|
return a === b
|
||||||
|
// special-case: NaN...
|
||||||
|
|| (isNaN(a) && isNaN(b))
|
||||||
// basic patters...
|
// basic patters...
|
||||||
|| a === that.ANY
|
|| a === that.ANY
|
||||||
|| b === that.ANY
|
|| b === that.ANY
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user