We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c2db22 commit a975065Copy full SHA for a975065
src/core/canvas-patcher.ts
@@ -45,7 +45,9 @@ export default class CanvasPatcher {
45
},
46
setViewData: (next: any) => function (json: string, ...args: any) {
47
const result = next.call(this, json, ...args)
48
- this.canvas.metadata = JSON.parse(json)?.metadata ?? {}
+
49
+ try { this.canvas.metadata = JSON.parse(json).metadata }
50
+ catch (_e) { this.canvas.metadata = {} }
51
52
that.triggerWorkspaceEvent(CanvasEvent.CanvasChanged, this.canvas)
53
0 commit comments