Skip to content

Commit

Permalink
Fix Node.js 12 compatibility
Browse files Browse the repository at this point in the history
Closes #224
  • Loading branch information
sindresorhus committed May 15, 2023
1 parent 287272d commit 4b1c2be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Expand Up @@ -354,15 +354,15 @@ class Ora {
return this;
}

const prefixText = options.prefixText ?? this.#prefixText;
const prefixText = options.prefixText || this.#prefixText;
const fullPrefixText = this.getFullPrefixText(prefixText, ' ');

const symbolText = options.symbol ?? ' ';
const symbolText = options.symbol || ' ';

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

const suffixText = options.suffixText ?? this.#suffixText;
const suffixText = options.suffixText !== undefined ? options.suffixText : this.#suffixText;
const fullSuffixText = this.getFullSuffixText(suffixText, ' ');

const textToWrite = fullPrefixText + symbolText + fullText + fullSuffixText + '\n';
Expand Down

0 comments on commit 4b1c2be

Please sign in to comment.