Fix serialization to dictionaries
This commit is contained in:
parent
343b2fb560
commit
147c02bdfd
3 changed files with 25 additions and 1 deletions
|
@ -60,7 +60,7 @@ export function GetCircularReplacer(): (key: any, value: object | Map<string, an
|
|||
if (key === 'parent') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (key === 'containers') {
|
||||
return Array.from((value as Map<string, any>).entries());
|
||||
}
|
||||
|
@ -83,6 +83,14 @@ export function GetCircularReplacerKeepDataStructure(): (key: any, value: object
|
|||
return;
|
||||
}
|
||||
|
||||
if (key === 'containers') {
|
||||
return Object.fromEntries(value as Map<string, any>);
|
||||
}
|
||||
|
||||
if (key === 'symbols') {
|
||||
return Object.fromEntries((value as Map<string, any>));
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue