diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index 0f83224e..ce8a18d8 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -104,7 +104,7 @@ Ox.isEqual Returns true if two values are equal > Ox.isEqual(Infinity, -Infinity) false > Ox.isEqual(NaN, NaN) - false + true > Ox.isEqual(document.getElementsByTagName('a'), document.getElementsByTagName('a')) true > Ox.isEqual(null, null) @@ -136,7 +136,8 @@ Ox.isEqual = function(a, b) { // 0 === -0, but not equal ret = a !== 0 || 1 / a === 1 / b; } else if (type == Ox.typeOf(b)) { - if (a == b) { + // NaN !== NaN, but equal + if (a == b || a !== b) { ret = true; } else if (type == 'date') { ret = +a == +b;