From a8dd65111228fad3db907336e6ced0f637463aba Mon Sep 17 00:00:00 2001 From: Michael Granados Date: Sun, 24 May 2020 17:15:30 -0300 Subject: [PATCH] fix error variable not defined Signed-off-by: Michael Granados --- lib/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index b5deb06..bebbb29 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,8 +20,11 @@ const checkServiceAccount = (config) => { /** Set to default **/ config.baseUrl = 'https://storage.googleapis.com/{bucket-name}'; } + + let serviceAccount; + try { - const serviceAccount = + serviceAccount = typeof config.serviceAccount === 'string' ? JSON.parse(config.serviceAccount) : config.serviceAccount;