Skip to content

Commit 6a10de5

Browse files
authored
Skip clear if there is nothing in the actionbar list (microsoft#164839)
1 parent 12ada73 commit 6a10de5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vs/base/browser/ui/actionbar/actionbar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ export class ActionBar extends Disposable implements IActionRunner {
419419
}
420420

421421
clear(): void {
422+
if (this.isEmpty()) {
423+
return;
424+
}
425+
422426
this.viewItems = dispose(this.viewItems);
423427
this.viewItemDisposables.clearAndDisposeAll();
424428
DOM.clearNode(this.actionsList);

0 commit comments

Comments
 (0)