Skip to content

Commit 4044c03

Browse files
committed
fix: clearPrevMessage validation
1 parent 52317d7 commit 4044c03

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';
@@ -675,7 +675,7 @@ export const spinner = () => {
675675
};
676676

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

0 commit comments

Comments
 (0)