diff --git a/web/app/components/plugins/install-plugin/install-bundle/steps/install-multi.tsx b/web/app/components/plugins/install-plugin/install-bundle/steps/install-multi.tsx index 7e406f1a95..48b1ecd325 100644 --- a/web/app/components/plugins/install-plugin/install-bundle/steps/install-multi.tsx +++ b/web/app/components/plugins/install-plugin/install-bundle/steps/install-multi.tsx @@ -136,9 +136,9 @@ const InstallByDSLList: FC = ({ const isLoadedAllData = (plugins.filter(p => !!p).length + errorIndexes.length) === allPlugins.length - const { installedInfo, isLoading: isLoadingCheckInstalled } = useCheckInstalled({ + const { installedInfo } = useCheckInstalled({ pluginIds: plugins?.filter(p => !!p).map((d) => { - return `${d?.org}/${d?.name}` + return `${d?.org || d?.author}/${d?.name}` }) || [], enabled: isLoadedAllData, }) @@ -182,7 +182,7 @@ const InstallByDSLList: FC = ({ dependency={d as GitHubItemAndMarketPlaceDependency} onFetchedPayload={handleGitHubPluginFetched(index)} onFetchError={handleGitHubPluginFetchError(index)} - versionInfo={getVersionInfo(`${plugin?.org}/${plugin?.name}`)} + versionInfo={getVersionInfo(`${plugin?.org || plugin?.author}/${plugin?.name}`)} />) } @@ -194,7 +194,7 @@ const InstallByDSLList: FC = ({ onCheckedChange={handleSelect(index)} payload={plugins[index] as Plugin} version={(d as GitHubItemAndMarketPlaceDependency).value.version!} - versionInfo={getVersionInfo(`${plugin?.org}/${plugin?.name}`)} + versionInfo={getVersionInfo(`${plugin?.org || plugin?.author}/${plugin?.name}`)} /> ) } @@ -207,7 +207,7 @@ const InstallByDSLList: FC = ({ onCheckedChange={handleSelect(index)} payload={d as PackageDependency} isFromMarketPlace={isFromMarketPlace} - versionInfo={getVersionInfo(`${plugin?.org}/${plugin?.name}`)} + versionInfo={getVersionInfo(`${plugin?.org || plugin?.author}/${plugin?.name}`)} /> ) }) diff --git a/web/app/components/plugins/types.ts b/web/app/components/plugins/types.ts index 338b160adf..7a44c7dd56 100644 --- a/web/app/components/plugins/types.ts +++ b/web/app/components/plugins/types.ts @@ -109,6 +109,7 @@ export type PluginDetail = { export type Plugin = { type: 'plugin' | 'bundle' org: string + author?: string name: string plugin_id: string version: string diff --git a/web/service/use-plugins.ts b/web/service/use-plugins.ts index 667aaf13ff..8ddca80ae1 100644 --- a/web/service/use-plugins.ts +++ b/web/service/use-plugins.ts @@ -163,7 +163,7 @@ export const useInstallOrUpdate = ({ return Promise.all(payload.map(async (item, i) => { try { - const orgAndName = `${plugin[i]?.org}/${plugin[i]?.name}` + const orgAndName = `${plugin[i]?.org || plugin[i]?.author}/${plugin[i]?.name}` const installedPayload = installedInfo[orgAndName] const isInstalled = !!installedPayload let uniqueIdentifier = ''