mirror of
https://github.com/mathuo/dockview
synced 2025-09-24 10:08:11 +00:00
check tabToRemove is not undefined before access
This commit is contained in:
parent
ca09ae537d
commit
3e409c4265
@ -283,6 +283,9 @@ export class TabsContainer
|
|||||||
|
|
||||||
const tabToRemove = this.tabs.splice(index, 1)[0];
|
const tabToRemove = this.tabs.splice(index, 1)[0];
|
||||||
|
|
||||||
|
if (!tabToRemove)
|
||||||
|
return;
|
||||||
|
|
||||||
const { value, disposable } = tabToRemove;
|
const { value, disposable } = tabToRemove;
|
||||||
|
|
||||||
disposable.dispose();
|
disposable.dispose();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user