mirror of
https://github.com/mathuo/dockview
synced 2025-09-12 20:28:04 +00:00
Merge pull request #845 from chris-mrl/fix-crash-open-popout-navigation
check tabToRemove is not undefined before access
This commit is contained in:
commit
06f02ba411
@ -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