Forráskód Böngészése

js: Don't exit the REPL when pressing enter on an empty line

Andreas Kling 5 éve
szülő
commit
9c7451a21d
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Userland/js.cpp

+ 1 - 1
Userland/js.cpp

@@ -164,7 +164,7 @@ void repl(JS::Interpreter& interpreter)
     while (true) {
         String piece = read_next_piece();
         if (piece.is_empty())
-            break;
+            continue;
 
         auto program = JS::Parser(JS::Lexer(piece)).parse_program();
         if (dump_ast)