From ec37310ae910ea2f0bb8b8d7b8bbf79175b913a6 Mon Sep 17 00:00:00 2001 From: fangnx Date: Tue, 21 May 2019 12:57:03 -0400 Subject: [PATCH] Fixed #5110: made "open source" only visible when it is available Signed-off-by: fangnx --- .../src/browser/mini-browser-open-handler.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/mini-browser/src/browser/mini-browser-open-handler.ts b/packages/mini-browser/src/browser/mini-browser-open-handler.ts index 9eea089d06bc2..2a87e266e4613 100644 --- a/packages/mini-browser/src/browser/mini-browser-open-handler.ts +++ b/packages/mini-browser/src/browser/mini-browser-open-handler.ts @@ -167,6 +167,14 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler this.preview(widget), @@ -176,7 +184,7 @@ export class MiniBrowserOpenHandler extends NavigatableWidgetOpenHandler this.openSource(widget), isEnabled: widget => !!this.getSourceUri(widget), - isVisible: widget => !!this.getSourceUri(widget) + isVisible: widget => !!this.getSourceUri(widget) && this.canOpenSource(widget) }); commands.registerCommand(MiniBrowserCommands.OPEN_URL, { execute: (arg?: string) => this.openUrl(arg)