Skip to content

Commit

Permalink
fix: failed to find group
Browse files Browse the repository at this point in the history
  • Loading branch information
chuyuandu committed Aug 1, 2024
1 parent 73e5dc3 commit 38323d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/dockview-core/src/dockview/dockviewComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ export class DockviewComponent
group = item;

const popoutReferenceGroupId = this._popoutGroups.find(
(_) => _.popoutGroup === group
(_) => _.popoutGroup.id === group.id
)?.referenceGroup;
const popoutReferenceGroup = popoutReferenceGroupId
? this.getPanel(popoutReferenceGroupId)
Expand Down Expand Up @@ -1715,7 +1715,7 @@ export class DockviewComponent

if (group.api.location.type === 'floating') {
const floatingGroup = this._floatingGroups.find(
(_) => _.group === group
(_) => _.group.id === group.id
);

if (floatingGroup) {
Expand All @@ -1728,7 +1728,7 @@ export class DockviewComponent
remove(this._floatingGroups, floatingGroup);
floatingGroup.dispose();

if (!options?.skipActive && this._activeGroup === group) {
if (!options?.skipActive && this._activeGroup?.id === group.id) {
const groups = Array.from(this._groups.values());

this.doSetGroupAndPanelActive(
Expand All @@ -1744,7 +1744,7 @@ export class DockviewComponent

if (group.api.location.type === 'popout') {
const selectedGroup = this._popoutGroups.find(
(_) => _.popoutGroup === group
(_) => _.popoutGroup.id === group.id
);

if (selectedGroup) {
Expand All @@ -1771,7 +1771,7 @@ export class DockviewComponent
this.doSetGroupAndPanelActive(removedGroup);
}

if (!options?.skipActive && this._activeGroup === group) {
if (!options?.skipActive && this._activeGroup?.id === group.id) {
const groups = Array.from(this._groups.values());

this.doSetGroupAndPanelActive(
Expand Down

0 comments on commit 38323d9

Please sign in to comment.