Skip to content

Commit

Permalink
chore: fix sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mathuo committed Dec 10, 2024
1 parent f13f009 commit e230237
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
13 changes: 7 additions & 6 deletions packages/dockview-core/src/dockview/dockviewComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,15 +767,16 @@ export class DockviewComponent

let returnedGroup: DockviewGroupPanel | undefined;

const isValidReferenceGroup =
isGroupAddedToDom &&
referenceGroup &&
this.getPanel(referenceGroup.id);

const value = {
window: _window,
popoutGroup: group,
referenceGroup: !isGroupAddedToDom
? undefined
: referenceGroup
? this.getPanel(referenceGroup.id)
? referenceGroup.id
: undefined
referenceGroup: isValidReferenceGroup
? referenceGroup.id
: undefined,
disposable: {
dispose: () => {
Expand Down
8 changes: 1 addition & 7 deletions packages/dockview-core/src/gridview/baseComponentGridview.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { Emitter, Event, AsapEvent } from '../events';
import {
getGridLocation,
Gridview,
IGridView,
MaximizedViewChanged,
} from './gridview';
import { getGridLocation, Gridview, IGridView } from './gridview';
import { Position } from '../dnd/droptarget';
import { Disposable, IDisposable, IValueDisposable } from '../lifecycle';
import { sequentialNumberGenerator } from '../math';
Expand All @@ -13,7 +8,6 @@ import { IPanel } from '../panel/types';
import { MovementOptions2 } from '../dockview/options';
import { Resizable } from '../resizable';
import { Classnames } from '../dom';
import { IGridviewComponent } from './gridviewComponent';

const nextLayoutId = sequentialNumberGenerator();

Expand Down
2 changes: 1 addition & 1 deletion packages/dockview-core/src/popoutWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class PopoutWindow extends CompositeDisposable {
resolve(container);
} catch (err) {
// only except this is the DOM isn't setup. e.g. in a in correctly configured test
reject(err);
reject(err as Error);
}
});
});
Expand Down

0 comments on commit e230237

Please sign in to comment.