chore: 预加载组件时容忍对应组件没找到

This commit is contained in:
2betop 2024-09-19 16:00:18 +08:00
parent 50ff14de1b
commit 10eb9590c9
2 changed files with 4 additions and 2 deletions

View File

@ -65,7 +65,7 @@ export class RootRenderer extends React.Component<RootRendererProps> {
}
}
});
return loadAsyncRenderersByType(types);
return loadAsyncRenderersByType(types, true);
});
}

View File

@ -310,7 +310,9 @@ export async function loadAsyncRenderer(renderer: RendererConfig) {
export function isAsyncRenderer(item: RendererConfig) {
return (
(!item.component || item.component === Placeholder) && item.getComponent
item &&
(!item.component || item.component === Placeholder) &&
item.getComponent
);
}