Skip to content

Commit

Permalink
fix when user press enter without any code
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 23, 2024
1 parent 11c6729 commit 04a7f77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,11 @@ function run_repl(err, rl) {
}
rl.on('line', function(line) {
try {
// user pressed enter without any code
if (!line) {
rl.prompt();
return;
}
cmd += line;
const code = cmd.replace(brackets_re, '');
if (cmd.match(/\x1b\[201~$/)) {
Expand Down

0 comments on commit 04a7f77

Please sign in to comment.