summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-10-20 13:36:14 -0400
committerLinus Groh <mail@linusgroh.de>2021-10-21 00:26:45 +0100
commitec54a7b5b09f7f86c99c247477b29267a274991b (patch)
tree3da224b62570ae2a232a63b29cc9086d9757fbbb /Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
parent04b4307b3d57a4c48abfa19a22d4745b23760d78 (diff)
downloadserenity-ec54a7b5b09f7f86c99c247477b29267a274991b.zip
LibJS: Implement IteratorClose with Completions and align to the spec
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
index ecc42e189e..f2a3c302ec 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
@@ -63,8 +63,7 @@ ThrowCompletionOr<MarkedValueList> iterable_to_list_of_type(GlobalObject& global
// 1. Let completion be ThrowCompletion(a newly created TypeError object).
auto completion = vm.throw_completion<TypeError>(global_object, ErrorType::IterableToListOfTypeInvalidValue, next_value.to_string_without_side_effects());
// 2. Return ? IteratorClose(iteratorRecord, completion).
- iterator_close(*iterator_record);
- return completion;
+ return iterator_close(*iterator_record, move(completion));
}
// iii. Append nextValue to the end of the List values.
values.append(next_value);