Skip to content

Commit 5cbb516

Browse files
Fixed migration failing on empty canvas
1 parent 1ef03c1 commit 5cbb516

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patchers/canvas-patcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class CanvasPatcher extends Patcher {
4949
return next.call(this, state)
5050
}),
5151
setViewData: Patcher.OverrideExisting(next => function (json: string, ...args: any): void {
52-
json = json !== '' ? json : '{}'
52+
json = json !== '' ? json : '{"nodes": [], "edges": []}'
5353

5454
try {
5555
const canvasData = JSONC.parse(json) as CanvasData

0 commit comments

Comments
 (0)