Skip to content

Commit 8b5e2b4

Browse files
liujupingJackLian
authored andcommitted
fix(material): fix rendering is blocked, when the url in the asset fails to load
1 parent cf3d7a8 commit 8b5e2b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/editor-core/src/editor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ export class Editor extends EventEmitter implements IEditor {
153153
return;
154154
}
155155
if (!AssetsCache[exportName] || !npm?.version || AssetsCache[exportName].npm?.version !== npm?.version) {
156-
await (new AssetLoader()).load(url);
156+
try {
157+
await (new AssetLoader()).load(url);
158+
} catch (error) {
159+
console.error(`${url} load error: `, error);
160+
}
157161
}
158162
AssetsCache[exportName] = component;
159163
function setAssetsComponent(component: any, extraNpmInfo: any = {}) {

0 commit comments

Comments
 (0)