Skip to content

Commit

Permalink
fix(ui): added null check to fix runtime error (#1847)
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <[email protected]>
  • Loading branch information
ciiay authored Oct 30, 2024
1 parent d4f03fe commit c426914
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/app/src/components/DynamicRoot/DynamicRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ export const DynamicRoot = ({
const allModules = allScopes.flatMap(scope => Object.values(scope));
const allImports = allModules.flatMap(module => Object.values(module));
const remoteBackstagePlugins = allImports.filter(imported => {
if (!imported) {
return false;
}
const prototype = Object.getPrototypeOf(imported);
return (
prototype !== undefined &&
Expand Down

0 comments on commit c426914

Please sign in to comment.