You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2024/11/06 03:37:35 UTC
(incubator-answer) branch fix/install-routes created (now eb6d78ff)
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a change to branch fix/install-routes
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
at eb6d78ff fix: fixed project initialization not allowing access to the plug-in interface, causing the page to continue loading #1162
This branch includes the following new commits:
new eb6d78ff fix: fixed project initialization not allowing access to the plug-in interface, causing the page to continue loading #1162
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-answer) 01/01: fix: fixed project initialization not allowing access to the plug-in interface, causing the page to continue loading #1162
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch fix/install-routes
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit eb6d78ff44c8ff093e674e6e53b3cf5d591241e1
Author: shuai <li...@sifou.com>
AuthorDate: Wed Nov 6 11:37:06 2024 +0800
fix: fixed project initialization not allowing access to the plug-in interface, causing the page to continue loading #1162
---
ui/src/utils/pluginKit/index.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/src/utils/pluginKit/index.ts b/ui/src/utils/pluginKit/index.ts
index 346c1456..a71a9539 100644
--- a/ui/src/utils/pluginKit/index.ts
+++ b/ui/src/utils/pluginKit/index.ts
@@ -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();
}
@@ -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;
}