Skip to content

Commit 5117dfb

Browse files
authoredNov 1, 2024
Fix handling of symbol being empty string in stopAndPersist() (#243)
1 parent c480a70 commit 5117dfb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ class Ora {
358358
const symbolText = options.symbol ?? ' ';
359359

360360
const text = options.text ?? this.text;
361-
const fullText = (typeof text === 'string') ? ' ' + text : '';
361+
const separatorText = symbolText ? ' ' : '';
362+
const fullText = (typeof text === 'string') ? separatorText + text : '';
362363

363364
const suffixText = options.suffixText ?? this.#suffixText;
364365
const fullSuffixText = this.#getFullSuffixText(suffixText, ' ');

0 commit comments

Comments
 (0)