system-setate: Fix Map parsing error on null values
This commit is contained in:
parent
1997833649
commit
b4ccae0946
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ export function serializeSystemState(state: SystemState) {
|
|||
|
||||
export function parseSystemState(json: string) {
|
||||
let diskState = JSON.parse(json, (k, v) => {
|
||||
if (v.hasOwnProperty('_type') && v._type == 'Map') {
|
||||
if (v?.hasOwnProperty('_type') && v?._type == 'Map') {
|
||||
return new Map(Object.entries(v.data))
|
||||
} else {
|
||||
return v
|
||||
|
|
Loading…
Reference in a new issue