Skip to content

Commit

Permalink
Fix handling of symbol being empty string in stopAndPersist() (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanxiaoge authored Nov 1, 2024
1 parent c480a70 commit 5117dfb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ class Ora {
const symbolText = options.symbol ?? ' ';

const text = options.text ?? this.text;
const fullText = (typeof text === 'string') ? ' ' + text : '';
const separatorText = symbolText ? ' ' : '';
const fullText = (typeof text === 'string') ? separatorText + text : '';

const suffixText = options.suffixText ?? this.#suffixText;
const fullSuffixText = this.#getFullSuffixText(suffixText, ' ');
Expand Down

0 comments on commit 5117dfb

Please sign in to comment.