This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch fix-bugs in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 88df4a6b6ed96626eaa375d3592f96d0f4e6de3c Author: mintsweet <[email protected]> AuthorDate: Wed Dec 27 17:11:40 2023 +1300 fix(config-ui): adjust no scope config operation condition --- config-ui/src/plugins/components/scope-config-select/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config-ui/src/plugins/components/scope-config-select/index.tsx b/config-ui/src/plugins/components/scope-config-select/index.tsx index 93cb0950d..dd5ba2169 100644 --- a/config-ui/src/plugins/components/scope-config-select/index.tsx +++ b/config-ui/src/plugins/components/scope-config-select/index.tsx @@ -42,8 +42,8 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance const { ready, data } = useRefreshData(() => API.scopeConfig.list(plugin, connectionId), [version]); const dataSource = useMemo( - () => (data ? (data.length ? [{ id: 'None', name: 'No Scope Config' }].concat(data) : []) : []), - [data], + () => (data ? (scopeConfigId ? [{ id: 'None', name: 'No Scope Config' }].concat(data) : data) : []), + [data, scopeConfigId], ); useEffect(() => {
