Skip to content

Commit

Permalink
Utilities: Make the js REPL autocomplete correctly handle new Ident
Browse files Browse the repository at this point in the history
Previously, `new` was being recognised as an identifier, which was
preventing this from working.
  • Loading branch information
alimpfard committed Jul 15, 2021
1 parent d83c672 commit 71234b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Utilities/js.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 71234b3

Please sign in to comment.