check tabToRemove is not undefined before access

This commit is contained in:
Chris Nolan 2025-01-28 08:15:19 +00:00
parent ca09ae537d
commit 3e409c4265
No known key found for this signature in database

View File

@ -283,6 +283,9 @@ export class TabsContainer
const tabToRemove = this.tabs.splice(index, 1)[0];
if (!tabToRemove)
return;
const { value, disposable } = tabToRemove;
disposable.dispose();