Fix serialization AGAIN in web workers

This commit is contained in:
Eric NGUYEN 2022-10-12 17:16:08 +02:00
parent 846f41829b
commit fff0645045
2 changed files with 7 additions and 15 deletions

View file

@ -84,6 +84,8 @@ function GetCircularReplacerKeepDataStructure()
if (key === 'linkedContainers') { if (key === 'linkedContainers') {
return Array.from(value); return Array.from(value);
} }
return value;
}; };
} }

View file

@ -34,26 +34,16 @@ function GetCircularReplacerKeepDataStructure()
} }
if (key === 'containers') { if (key === 'containers') {
return [...value.entries()].map((keyPair) => { const containers = Array.from(value).map(([Key, Value]) => ({ Key, Value }));
return { return containers;
Key: keyPair[0],
Value: keyPair[1]
};
});
} }
if (key === 'symbols') { if (key === 'symbols') {
return [...value.entries()].map((keyPair) => { const symbols = Array.from(value).map(([Key, Value]) => ({ Key, Value }));
return { return symbols;
Key: keyPair[0],
Value: keyPair[1]
};
});
} }
if (key === 'linkedContainers') { return value;
return Array.from(value);
}
}; };
} }