Skip to content

Commit

Permalink
fix: keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
couriourc committed Sep 8, 2024
1 parent 0dfb44f commit c8fe1f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ readline.emitKeypressEvents(process.stdin);
process.stdin.setRawMode(true);
// 监听事件
process.stdin.on('keypress', (str) => {
str = str.toLowerCase();
str = str?.toLowerCase?.();
switch (str) {
//按r重启
case 'r':
Expand Down

0 comments on commit c8fe1f6

Please sign in to comment.