Skip to content

Commit

Permalink
Fix issue with character check
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Feb 9, 2023
1 parent 2cfcef6 commit 246ca6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @clack/core

## 0.0.6

### Patch Changes

- Fix error with character check

## 0.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clack/core",
"version": "0.0.5",
"version": "0.0.6",
"type": "module",
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/prompts/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class Prompt {
if (key?.name && keys.has(key.name)) {
this.emit('cursor', key.name);
}
if (char.toLowerCase() === 'y' || char.toLowerCase() === 'n') {
if (char && (char.toLowerCase() === 'y' || char.toLowerCase() === 'n')) {
this.emit('confirm', char.toLowerCase() === 'y');
}

Expand Down

0 comments on commit 246ca6c

Please sign in to comment.