From ce0bed048277ee41ba09cb41f5961b11003840d0 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 2 May 2020 16:01:09 +0100 Subject: [PATCH] js: Ignore property attributes for completion Only being able to complete enumerable properties is annoying, especially since we updated everything to use the correct attributes. Most standard built-in objects are *not* enumerable. --- Userland/js.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Userland/js.cpp b/Userland/js.cpp index d5cb856ac7d..f3048bdd555 100644 --- a/Userland/js.cpp +++ b/Userland/js.cpp @@ -617,12 +617,10 @@ int main(int argc, char** argv) Function list_all_properties = [&results, &list_all_properties](const JS::Shape& shape, auto& property_pattern) { for (const auto& descriptor : shape.property_table()) { - if (descriptor.value.attributes & JS::Attribute::Enumerable) { - if (descriptor.key.view().starts_with(property_pattern)) { - Line::CompletionSuggestion completion { descriptor.key }; - if (!results.contains_slow(completion)) { // hide duplicates - results.append(completion); - } + if (descriptor.key.view().starts_with(property_pattern)) { + Line::CompletionSuggestion completion { descriptor.key }; + if (!results.contains_slow(completion)) { // hide duplicates + results.append(completion); } } }