Pārlūkot izejas kodu

Utilities: Make the js REPL autocomplete correctly handle `new Ident`

Previously, `new` was being recognised as an identifier, which was
preventing this from working.
Ali Mohammad Pur 4 gadi atpakaļ
vecāks
revīzija
71234b3716
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Userland/Utilities/js.cpp

+ 1 - 1
Userland/Utilities/js.cpp

@@ -1030,7 +1030,7 @@ int main(int argc, char** argv)
                 case CompleteProperty:
                     // something came after the property access, reset to initial
                 case Initial:
-                    if (js_token.is_identifier_name()) {
+                    if (js_token.type() == JS::TokenType::Identifier) {
                         // ...<name>...
                         mode = CompleteVariable;
                         variable_name = js_token.value();