summaryrefslogtreecommitdiff
path: root/Userland/js.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-05-02 16:01:09 +0100
committerAndreas Kling <kling@serenityos.org>2020-05-02 19:21:50 +0200
commitce0bed048277ee41ba09cb41f5961b11003840d0 (patch)
treed4789dc11c2772185fa5bead9da75b4fb0ae655c /Userland/js.cpp
parent628777f94acb92ea89798daedeaa2a4deac13b4b (diff)
downloadserenity-ce0bed048277ee41ba09cb41f5961b11003840d0.zip
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.
Diffstat (limited to 'Userland/js.cpp')
-rw-r--r--Userland/js.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Userland/js.cpp b/Userland/js.cpp
index d5cb856ac7..f3048bdd55 100644
--- a/Userland/js.cpp
+++ b/Userland/js.cpp
@@ -617,12 +617,10 @@ int main(int argc, char** argv)
Function<void(const JS::Shape&, const StringView&)> 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);
}
}
}