Skip to content

Commit

Permalink
fix(material): fix rendering is blocked, when the url in the asset fa…
Browse files Browse the repository at this point in the history
…ils to load
  • Loading branch information
liujuping authored and JackLian committed Aug 18, 2023
1 parent cf3d7a8 commit 8b5e2b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/editor-core/src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ export class Editor extends EventEmitter implements IEditor {
return;
}
if (!AssetsCache[exportName] || !npm?.version || AssetsCache[exportName].npm?.version !== npm?.version) {
await (new AssetLoader()).load(url);
try {
await (new AssetLoader()).load(url);
} catch (error) {
console.error(`${url} load error: `, error);
}
}
AssetsCache[exportName] = component;
function setAssetsComponent(component: any, extraNpmInfo: any = {}) {
Expand Down

0 comments on commit 8b5e2b4

Please sign in to comment.