diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 1e8faf349..a7b3b878a 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -222,6 +222,11 @@ class WorkspacesView extends WorkspacesViewBase { } } + for (let j = this._workspaces.length - 1; j >= newNumWorkspaces; j--) { + this._workspaces[j].destroy(); + this._workspaces.splice(j, 1); + } + this._updateScrollPosition(); }