Skip to content

Commit

Permalink
BUGFIX: Don’t load empty command lists from plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Jan 8, 2024
1 parent b197055 commit 69fb7e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui-plugin/src/CommandBarUiPlugin.tsx
Expand Up @@ -266,7 +266,9 @@ class CommandBarUiPlugin extends React.PureComponent<CommandBarUiPluginProps, Co
const plugin = plugins[pluginName];
try {
const pluginResult = await plugin();
pluginCommands = { ...pluginCommands, ...pluginResult };
if (Object.keys(pluginResult).length > 0) {
pluginCommands = { ...pluginCommands, ...pluginResult };
}
} catch (e) {
logger.warn(`Could not load commands from plugin ${pluginName}`, e);
}
Expand Down

0 comments on commit 69fb7e8

Please sign in to comment.