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:
Sychev Andrey
2026-07-14 12:04:21 +02:00
parent 31ee01b6fa
commit 3135edf434
4 changed files with 7 additions and 7 deletions
@@ -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;
}
@@ -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 {
@@ -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;
}
@@ -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 {