fix error for download extension (#4793)

This commit is contained in:
Alan Ren
2019-04-01 16:44:15 -07:00
committed by GitHub
parent 2faf01eb9d
commit a766e5d334

View File

@@ -185,7 +185,10 @@ export class InstallAction extends ExtensionAction {
const extension = await this.install(this.extension);
if (extension.local) {
// {{SQL CARBON EDIT}}
// Add extension object check since ADS third party extensions will be directed to a download page
// and the extension object will be undefined.
if (extension && extension.local) {
const runningExtension = await this.getRunningExtension(extension.local);
if (runningExtension) {
const colorThemes = await this.workbenchThemeService.getColorThemes();