Skip to content

Commit

Permalink
Fix 'frame' parameter invalid.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 10, 2018
1 parent 3bdce97 commit dfe1e16
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ function loading(options) {
}

loading.prototype.frame = function (frame) {
var frames = frame || this.frames;
if (frame) this.options.frames = frame;
var frames = this.options.frames;
// var frames = ["◜", "◠", "◝", "◞", "◡", "◟"];
// var frames = ["◰", "◳", "◲", "◱"]
// var frames = ["◐", "◓", "◑", "◒"]
Expand All @@ -62,14 +63,11 @@ loading.prototype.frame = function (frame) {
}

loading.prototype.clear = function () {

if (!this.enabled) {
return this;
}

this.stream.clearLine();
this.stream.cursorTo(0);

return this;
}

Expand Down Expand Up @@ -97,7 +95,6 @@ loading.prototype.stop = function () {
return this;
}


loading.prototype.succeed = function (text) {
return this.stopAndPersist(color.green('✔'), text);
}
Expand Down

0 comments on commit dfe1e16

Please sign in to comment.