Skip to content

Commit 78d4f34

Browse files
Register toggle since it's a disposable (microsoft#208249)
Saw this in our unit tests when I was playing with depending on Checkbox.
1 parent 288be7d commit 78d4f34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export class Checkbox extends Widget {
237237
constructor(private title: string, private isChecked: boolean, styles: ICheckboxStyles) {
238238
super();
239239

240-
this.checkbox = new Toggle({ title: this.title, isChecked: this.isChecked, icon: Codicon.check, actionClassName: 'monaco-checkbox', ...unthemedToggleStyles });
240+
this.checkbox = this._register(new Toggle({ title: this.title, isChecked: this.isChecked, icon: Codicon.check, actionClassName: 'monaco-checkbox', ...unthemedToggleStyles }));
241241

242242
this.domNode = this.checkbox.domNode;
243243

0 commit comments

Comments
 (0)