mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: check if the param config is boolean
This commit is contained in:
parent
430425ce2f
commit
672589b553
1 changed files with 3 additions and 1 deletions
|
@ -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'));
|
||||
|
|
Loading…
Reference in a new issue