From 0b90cbbe9063d05e01d62d4a9b21df1cd50e7933 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 27 Sep 2018 14:41:13 +0200 Subject: [PATCH] fix #59539 --- src/vs/workbench/common/notifications.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/common/notifications.ts b/src/vs/workbench/common/notifications.ts index 564d922dca4..a69d0f1f705 100644 --- a/src/vs/workbench/common/notifications.ts +++ b/src/vs/workbench/common/notifications.ts @@ -553,7 +553,9 @@ export class ChoiceAction extends Action { private _onDidRun = new Emitter(); get onDidRun(): Event { return this._onDidRun.event; } - constructor(id: string, private choice: IPromptChoice) { + private _keepOpen: boolean; + + constructor(id: string, choice: IPromptChoice) { super(id, choice.label, null, true, () => { // Pass to runner @@ -564,17 +566,17 @@ export class ChoiceAction extends Action { return TPromise.as(void 0); }); + + this._keepOpen = choice.keepOpen; } get keepOpen(): boolean { - return this.choice.keepOpen; + return this._keepOpen; } dispose(): void { super.dispose(); - this.choice = null; - this._onDidRun.dispose(); } } \ No newline at end of file -- GitLab