chore: fix sonar issues

This commit is contained in:
mathuo 2024-12-10 19:30:32 +00:00
parent f13f009155
commit e2302372b1
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281
3 changed files with 9 additions and 14 deletions

View File

@ -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: () => {

View File

@ -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';
@ -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();

View File

@ -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);
}
});
});