You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2024/05/10 10:48:15 UTC
(incubator-devlake) branch main updated: fix: error condition for not related project data scope (#7454)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 5aac71130 fix: error condition for not related project data scope (#7454)
5aac71130 is described below
commit 5aac71130d12868f89074414c441e54cef51ca64
Author: 青湛 <0x...@gmail.com>
AuthorDate: Fri May 10 22:48:09 2024 +1200
fix: error condition for not related project data scope (#7454)
---
config-ui/src/plugins/components/scope-config/index.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config-ui/src/plugins/components/scope-config/index.tsx b/config-ui/src/plugins/components/scope-config/index.tsx
index 61ec1dc07..0487536b2 100644
--- a/config-ui/src/plugins/components/scope-config/index.tsx
+++ b/config-ui/src/plugins/components/scope-config/index.tsx
@@ -59,12 +59,12 @@ export const ScopeConfig = ({ plugin, connectionId, scopeId, scopeName, id, name
const [success, res] = await operator(() => API.scopeConfig.check(plugin, id), { hideToast: true });
if (success) {
- const projects = res.projects.map((it: any) => ({
+ const projects = (res.projects ?? []).map((it: any) => ({
name: it.name,
scopes: it.scopes,
}));
- if (projects.length !== 1) {
+ if (projects.length > 0) {
setRelatedProjects(projects);
setType('relatedProjects');
} else {