Skip to content

Commit

Permalink
fix: 排序兜底
Browse files Browse the repository at this point in the history
  • Loading branch information
maotoumao committed Dec 23, 2023
1 parent e6e1c26 commit 1459afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/core/plugin-delegate/internal/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function getSupportedPlugin(
export function getSortedSupportedPlugin(
featureMethod: keyof IPlugin.IPluginInstanceMethods
) {
const meta = rendererAppConfig.getAppConfigPath("private.pluginMeta");
const meta = rendererAppConfig.getAppConfigPath("private.pluginMeta") ?? {};
return delegatePluginsStore
.getValue()
.filter((_) => _.supportedMethod.includes(featureMethod))
Expand All @@ -43,7 +43,7 @@ export function useSupportedPlugin(
export function useSortedSupportedPlugin(
featureMethod: keyof IPlugin.IPluginInstanceMethods
) {
const meta = rendererAppConfig.getAppConfigPath("private.pluginMeta");
const meta = rendererAppConfig.getAppConfigPath("private.pluginMeta") ?? {};
return delegatePluginsStore
.useValue()
.filter((_) => _.supportedMethod.includes(featureMethod))
Expand Down

0 comments on commit 1459afd

Please sign in to comment.