saveload: Remove reference replacer from the replacer. It must now crash every time there is a circular reference
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c3e2eaf8a8
commit
7d7d627ab8
1 changed files with 0 additions and 7 deletions
|
@ -42,7 +42,6 @@ export function Revive(editorState: IEditorState): void {
|
|||
}
|
||||
|
||||
export const getCircularReplacer = (): (key: any, value: object | null) => object | null | undefined => {
|
||||
const seen = new WeakSet();
|
||||
return (key: any, value: object | null) => {
|
||||
if (key === 'parent') {
|
||||
return;
|
||||
|
@ -52,12 +51,6 @@ export const getCircularReplacer = (): (key: any, value: object | null) => objec
|
|||
return;
|
||||
}
|
||||
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
if (seen.has(value)) {
|
||||
return;
|
||||
}
|
||||
seen.add(value);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue