Skip to content

Commit 0c2db22

Browse files
Fixed critical bug where new canvases throw error
1 parent 4e82124 commit 0c2db22

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "advanced-canvas",
33
"name": "Advanced Canvas",
4-
"version": "2.7.1",
4+
"version": "2.7.2",
55
"minAppVersion": "1.1.0",
66
"description": "Supercharge your canvas experience! Create presentations, flowcharts and more!",
77
"author": "Developer-Mike",

src/core/canvas-patcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class CanvasPatcher {
4545
},
4646
setViewData: (next: any) => function (json: string, ...args: any) {
4747
const result = next.call(this, json, ...args)
48-
this.canvas.metadata = JSON.parse(json).metadata
48+
this.canvas.metadata = JSON.parse(json)?.metadata ?? {}
4949

5050
that.triggerWorkspaceEvent(CanvasEvent.CanvasChanged, this.canvas)
5151

0 commit comments

Comments
 (0)