This commit is contained in:
parent
17a0f40fcd
commit
263c0ccfba
12
mylogger.js
12
mylogger.js
|
@ -716,8 +716,16 @@ function equals(a, b) {
|
||||||
if (a == null || b == null || type !== typeof b)
|
if (a == null || b == null || type !== typeof b)
|
||||||
return false;
|
return false;
|
||||||
if (type === 'object' && a.constructor === b.constructor) {
|
if (type === 'object' && a.constructor === b.constructor) {
|
||||||
if (a instanceof Date)
|
if (a instanceof Date) {
|
||||||
return a.getTime() === b.getTime();
|
// FIXME: zongji creates invalid dates for NULL DATE
|
||||||
|
// Error is somewhere here: zongji/lib/rows_event.js:129
|
||||||
|
let aTime = a.getTime();
|
||||||
|
if (isNaN(aTime)) aTime = null;
|
||||||
|
let bTime = b.getTime();
|
||||||
|
if (isNaN(bTime)) bTime = null;
|
||||||
|
|
||||||
|
return aTime === bTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue