Skip to content

Commit

Permalink
Fix input's cursor start (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
onsclom committed Mar 29, 2024
1 parent 73b4ba5 commit 98e4b50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/input/src/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,10 @@ export default createPrompt<string, InputConfig>((config, done) => {
error = theme.style.error(errorMsg);
}

return [[prefix, message, defaultStr, formattedValue].filter(Boolean).join(' '), error];
return [
[prefix, message, defaultStr, formattedValue]
.filter((v) => v !== undefined)
.join(' '),
error,
];
});

0 comments on commit 98e4b50

Please sign in to comment.