From c51c5b34d068e079ad469d516b17170d573df3c8 Mon Sep 17 00:00:00 2001 From: Stephen Weatherford Date: Tue, 8 Jan 2019 17:42:39 -0800 Subject: [PATCH] fix null ref from importCertificates --- utils/getTrustedCertificates.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/getTrustedCertificates.ts b/utils/getTrustedCertificates.ts index 433a58299d..b2cfebf97b 100644 --- a/utils/getTrustedCertificates.ts +++ b/utils/getTrustedCertificates.ts @@ -32,8 +32,10 @@ export async function getTrustedCertificates(): Promise<(string | Buffer)[]> { this.suppressTelemetry = true; let importSetting = vscode.workspace.getConfiguration('docker').get('importCertificates'); - if (importSetting === false) { - // Use default Node.js behavior + + // If value is false or null/undefined or anything not an object or boolean... + if (!importSetting || (typeof importSetting !== "object" && typeof importSetting !== "boolean")) { + // ... then use default Node.js behavior this.properties.importCertificates = 'false'; return undefined; }