mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
dbeaver/pro#9638 fix: update project filtering logic to use project IDs for active projects
Changed all four spots from reference equality to id comparison, matching the rest of the codebase, see https://github.com/dbeaver/cloudbeaver/issues/4430
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* CloudBeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020-2025 DBeaver Corp and others
|
||||
* Copyright (C) 2020-2026 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,7 +63,7 @@ export function navigationTreeProjectFilter(
|
||||
if (isRMProjectNode(node)) {
|
||||
const project = projectsNavNodeService.getProject(node.uri);
|
||||
|
||||
if (!project || !projectsService.activeProjects.includes(project)) {
|
||||
if (!project || !projectsService.activeProjects.some(({ id }) => id === project.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* CloudBeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020-2024 DBeaver Corp and others
|
||||
* Copyright (C) 2020-2026 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@ export function navigationTreeProjectsExpandStateGetter(
|
||||
let active = false;
|
||||
const project = projectsNavNodeService.getByNodeId(nodeId);
|
||||
if (project) {
|
||||
active = projectsService.activeProjects.includes(project);
|
||||
active = projectsService.activeProjects.some(({ id }) => id === project.id);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ export function navigationTreeProjectFilter(
|
||||
if (isProjectNode(node)) {
|
||||
const project = projectsNavNodeService.getProject(node.uri);
|
||||
|
||||
if (!project || !projectsService.activeProjects.includes(project)) {
|
||||
if (!project || !projectsService.activeProjects.some(({ id }) => id === project.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* CloudBeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020-2024 DBeaver Corp and others
|
||||
* Copyright (C) 2020-2026 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@ export function navigationTreeProjectsExpandStateGetter(
|
||||
let active = false;
|
||||
const project = projectsNavNodeService.getByNodeId(nodeId);
|
||||
if (project) {
|
||||
active = projectsService.activeProjects.includes(project);
|
||||
active = projectsService.activeProjects.some(({ id }) => id === project.id);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user