From d655a0a42eb43ab73996e3db8da8ca8913e7a048 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 23 Oct 2021 02:29:14 +0100 Subject: [PATCH] LibJS: Add "at" to Array.prototype[@@unscopables] --- Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp index 1a7f6f1fb7..9d5cfbe02c 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/ArrayPrototype.cpp @@ -82,6 +82,7 @@ void ArrayPrototype::initialize(GlobalObject& global_object) // 23.1.3.35 Array.prototype [ @@unscopables ], https://tc39.es/ecma262/#sec-array.prototype-@@unscopables // With proposal, https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype-@@unscopables auto* unscopable_list = Object::create(global_object, nullptr); + MUST(unscopable_list->create_data_property_or_throw(vm.names.at, Value(true))); MUST(unscopable_list->create_data_property_or_throw(vm.names.copyWithin, Value(true))); MUST(unscopable_list->create_data_property_or_throw(vm.names.entries, Value(true))); MUST(unscopable_list->create_data_property_or_throw(vm.names.fill, Value(true)));