Skip to content

Commit dfe1e16

Browse files
committed
Fix 'frame' parameter invalid.
1 parent 3bdce97 commit dfe1e16

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ function loading(options) {
4444
}
4545

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

6465
loading.prototype.clear = function () {
65-
6666
if (!this.enabled) {
6767
return this;
6868
}
69-
7069
this.stream.clearLine();
7170
this.stream.cursorTo(0);
72-
7371
return this;
7472
}
7573

@@ -97,7 +95,6 @@ loading.prototype.stop = function () {
9795
return this;
9896
}
9997

100-
10198
loading.prototype.succeed = function (text) {
10299
return this.stopAndPersist(color.green('✔'), text);
103100
}

0 commit comments

Comments
 (0)