Skip to content

Commit 1bf8dfe

Browse files
committed
fix(plugin): 修复serverPlugin判断不严谨导致报错
1 parent dddafdf commit 1bf8dfe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/ServersPlugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ class ServersPlugin {
132132
// 加载后钩子
133133
this.editor.hooksEntity.hookImportAfter.callAsync(jsonFile, () => {
134134
// 修复导入带水印的json无法清除问题 #359
135-
this.editor?.updateDrawStatus(!!temp['overlayImage']);
135+
this.editor?.updateDrawStatus &&
136+
typeof this.editor.updateDrawStatus === 'function' &&
137+
this.editor.updateDrawStatus(!!temp['overlayImage']);
136138
this.canvas.renderAll();
137139
callback && callback();
138140
this.editor.emit('loadJson');

0 commit comments

Comments
 (0)