Skip to content

Commit 4b1c2be

Browse files
committedMay 15, 2023
Fix Node.js 12 compatibility
Closes #224
1 parent 287272d commit 4b1c2be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,15 @@ class Ora {
354354
return this;
355355
}
356356

357-
const prefixText = options.prefixText ?? this.#prefixText;
357+
const prefixText = options.prefixText || this.#prefixText;
358358
const fullPrefixText = this.getFullPrefixText(prefixText, ' ');
359359

360-
const symbolText = options.symbol ?? ' ';
360+
const symbolText = options.symbol || ' ';
361361

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

365-
const suffixText = options.suffixText ?? this.#suffixText;
365+
const suffixText = options.suffixText !== undefined ? options.suffixText : this.#suffixText;
366366
const fullSuffixText = this.getFullSuffixText(suffixText, ' ');
367367

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

0 commit comments

Comments
 (0)
Please sign in to comment.