Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
dealing with numeric defaults is hard
Browse files Browse the repository at this point in the history
  • Loading branch information
othiym23 committed Nov 22, 2014
1 parent 216f96a commit 5585def
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -30,9 +30,9 @@ function RegClient (config) {

this.config.retry = this.config.retry || {}
if (typeof this.config.retry.retries !== "number") this.config.retry.retries = 2
if (!this.config.retry.factor) this.config.retry.factor = 10
if (!this.config.retry.minTimeout) this.config.retry.minTimeout = 10000
if (!this.config.retry.maxTimeout) this.config.retry.maxTimeout = 60000
if (typeof this.config.retry.factor !== "number") this.config.retry.factor = 10
if (typeof this.config.retry.minTimeout !== "number") this.config.retry.minTimeout = 10000
if (typeof this.config.retry.maxTimeout !== "number") this.config.retry.maxTimeout = 60000

this.config.userAgent = this.config.userAgent || "node/" + process.version
this.config.defaultTag = this.config.defaultTag || "latest"
Expand Down

0 comments on commit 5585def

Please sign in to comment.