From 672589b55315ac0582bf5e127379a8e871c5a8d6 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Mon, 24 Jul 2017 07:34:32 +0200 Subject: [PATCH] refactor: check if the param config is boolean --- src/lib/storage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/storage.js b/src/lib/storage.js index 22598cdf0..9c1be72ca 100644 --- a/src/lib/storage.js +++ b/src/lib/storage.js @@ -83,7 +83,9 @@ class Storage { // if uplink fails with a status other than 404, we report failure if (_.isNil(err_results[i][0]) === false) { if (err_results[i][0].status !== 404) { - if (_.isNil(this.config.publish) === false && this.config.publish.allow_offline) { + if (_.isNil(this.config.publish) === false && + _.isBoolean(this.config.publish.allow_offline) && + this.config.publish.allow_offline) { return resolve(); } return reject(Error[503]('one of the uplinks is down, refuse to publish'));