Browse Source

Improve date normalization in abp.js to handle invalid dates

pull/22226/head
maliming 2 years ago
parent
commit
7c84e6ad13
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 6
      npm/packs/core/src/abp.js

6
npm/packs/core/src/abp.js

@ -784,9 +784,13 @@ var abp = abp || {};
};
abp.clock.normalize = function (date) {
if (!date || Object.prototype.toString.call(date) !== '[object Date]' || isNaN(date)) {
return date;
}
var kind = abp.clock.kind;
if (kind === 'Unspecified') {
if (!kind || kind === 'Unspecified') {
return date;
}

Loading…
Cancel
Save