diff --git a/lib/index.js b/lib/index.js index 72cf668..2e735ba 100644 --- a/lib/index.js +++ b/lib/index.js @@ -110,7 +110,7 @@ function createAndWrapKeyVaultClient(options) { if (!options) { throw new Error('No options provided for the key vault resolver.'); } - let client = typeof(options) === 'function' && options.getSecret ? options : options.client; + let client = options && options.getSecret && typeof(options.getSecret) === 'function' ? options : options.client; if (options.credentials && !client) { client = new azureKeyVault.KeyVaultClient(options.credentials); } diff --git a/package.json b/package.json index c2e5ae2..d9b72c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ospo/keyvault-configuration-resolver", - "version": "0.9.2", + "version": "0.9.3", "description": "Resolves custom keyvault:// URI values within an object graph using Azure KeyVault", "main": "lib/index.js", "engines": {