Extend equalArray to consider NaNs to be equal
This commit is contained in:
@@ -522,7 +522,8 @@
|
|||||||
if (equal) {
|
if (equal) {
|
||||||
var j = 0;
|
var j = 0;
|
||||||
for (j = 0; j < other.length; ++j) {
|
for (j = 0; j < other.length; ++j) {
|
||||||
if (this.obj[j] !== other[j]) {
|
if (this.obj[j] !== other[j] &&
|
||||||
|
!(isNaN(this.obj[j]) && isNaN(other[j]))) {
|
||||||
equal = false;
|
equal = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user