Skip to content

Commit

Permalink
fix: fixed project initialization not allowing access to the plug-in …
Browse files Browse the repository at this point in the history
…interface, causing the page to continue loading #1162
  • Loading branch information
shuashuai committed Nov 6, 2024
1 parent 8e3ce7d commit 350db91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/utils/pluginKit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class Plugins {
async init() {
this.registerBuiltin();

const plugins = await getPluginsStatus().catch(() => []);
// Note: The /install stage does not allow access to the getPluginsStatus api, so an initial value needs to be given
const plugins = (await getPluginsStatus().catch(() => [])) || [];
this.registeredPlugins = plugins.filter((p) => p.enabled);
await this.registerPlugins();
}
Expand Down Expand Up @@ -169,6 +170,7 @@ const validateRoutePlugin = async (slugName) => {

const mergeRoutePlugins = async (routes) => {
const routePlugins = await getRoutePlugins();
console.log('routePlugins', routePlugins);
if (routePlugins.length === 0) {
return routes;
}
Expand Down

0 comments on commit 350db91

Please sign in to comment.