Skip to content

Commit cd1d021

Browse files
committed
Clear spinner text on stop
1 parent 8e2ec3e commit cd1d021

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

registry/lib/spinner.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function Spinner(options) {
138138
const text = args.at(0)
139139
const normalized = normalizeText(text)
140140
// We clear this.text on start when `text` is falsy because yocto-spinner
141-
// would not clear it otherwise.
141+
// will not clear it otherwise.
142142
if (!normalized) {
143143
this.setText('')
144144
}
@@ -147,6 +147,8 @@ function Spinner(options) {
147147
}
148148

149149
stop(...args) {
150+
// We clear this.text on stop because yocto-spinner will not clear it.
151+
this.setText('')
150152
return this.#apply('stop', args)
151153
}
152154

0 commit comments

Comments
 (0)