Skip to content

Commit

Permalink
fix(spinner): wrong argument order
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Mar 26, 2018
1 parent 6f48111 commit 93824e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = class Logress {
constructor (opts) {
opts = opts || {}
const stream = opts.stream || process.stderr
const spinner = opts.spinner
const spinner = opts.spinner || null
const force = opts.force || false
const cursor = opts.cursor

Expand Down Expand Up @@ -54,7 +54,7 @@ module.exports = class Logress {
// default value
id = id || 0

if (options) this._spinners[id] = new Spinner(options, {}, this._spinner)
if (options) this._spinners[id] = new Spinner(null, options, this._spinner)

if (!this._spinners[id]) {
this._spinners[id] = new Spinner(this._spinner)
Expand Down

0 comments on commit 93824e2

Please sign in to comment.