From 71234b3716964775a7daf56bcbf19111f9380c20 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Fri, 16 Jul 2021 02:33:09 +0430 Subject: [PATCH] Utilities: Make the js REPL autocomplete correctly handle `new Ident` Previously, `new` was being recognised as an identifier, which was preventing this from working. --- Userland/Utilities/js.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 51b91d3759..cd68400cb0 100644 --- a/Userland/Utilities/js.cpp +++ b/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) { // ...... mode = CompleteVariable; variable_name = js_token.value();