Skip to content

Commit

Permalink
Skip clear if there is nothing in the actionbar list (#164839)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz authored Oct 28, 2022
1 parent 12ada73 commit 6a10de5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vs/base/browser/ui/actionbar/actionbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@ export class ActionBar extends Disposable implements IActionRunner {
}

clear(): void {
if (this.isEmpty()) {
return;
}

this.viewItems = dispose(this.viewItems);
this.viewItemDisposables.clearAndDisposeAll();
DOM.clearNode(this.actionsList);
Expand Down

0 comments on commit 6a10de5

Please sign in to comment.