Skip to content

Commit b4f2ba2

Browse files
committed
fix: clearPrevMessage validation
1 parent 8ff7134 commit b4f2ba2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/prompts/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
SelectKeyPrompt,
99
SelectPrompt,
1010
State,
11-
TextPrompt
11+
TextPrompt,
1212
} from '@clack/core';
1313
import { isCI } from 'ci-info';
1414
import isUnicodeSupported from 'is-unicode-supported';
@@ -673,7 +673,7 @@ export const spinner = () => {
673673
};
674674

675675
const clearPrevMessage = () => {
676-
if (!_prevMessage) return;
676+
if (_prevMessage === undefined) return;
677677
if (isCI) process.stdout.write('\n');
678678
const prevLines = _prevMessage.split('\n');
679679
process.stdout.write(cursor.move(-999, prevLines.length - 1));

0 commit comments

Comments
 (0)