Skip to content

Commit

Permalink
Fixed critical bug where new canvases throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
Developer-Mike committed Mar 23, 2024
1 parent 4e82124 commit 0c2db22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "advanced-canvas",
"name": "Advanced Canvas",
"version": "2.7.1",
"version": "2.7.2",
"minAppVersion": "1.1.0",
"description": "Supercharge your canvas experience! Create presentations, flowcharts and more!",
"author": "Developer-Mike",
Expand Down
2 changes: 1 addition & 1 deletion src/core/canvas-patcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class CanvasPatcher {
},
setViewData: (next: any) => function (json: string, ...args: any) {
const result = next.call(this, json, ...args)
this.canvas.metadata = JSON.parse(json).metadata
this.canvas.metadata = JSON.parse(json)?.metadata ?? {}

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

Expand Down

0 comments on commit 0c2db22

Please sign in to comment.