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') {
return Array.from(value);
}
return value;
};
}

View file

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