mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-27 19:42:11 +10:00
Fix null handling
This commit is contained in:
parent
251e0b2beb
commit
b74ffebb3e
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ export const storedData = storageKey => {
|
|||
// Dates are expected to be in format: { date: new Date(), _serializedType: 'SerializableDate' }
|
||||
const reviver = (k, v) => {
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
if (typeof v === 'object' && v._serializedType === 'SerializableDate') {
|
||||
if (v && typeof v === 'object' && v._serializedType === 'SerializableDate') {
|
||||
return new Date(v.date);
|
||||
}
|
||||
return types.reviver(k, v);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue