mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
LibJS: get_iterator_values() should pass Value to callback (not Value&)
Value& implies that the callback is expected/able to modify the value, which is not the case.
This commit is contained in:
parent
b4bfc3ed54
commit
d85eed585c
4 changed files with 6 additions and 6 deletions
|
@ -108,7 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
|
|||
array->set_indexed_property_elements(move(elements));
|
||||
} else {
|
||||
// * iterable objects
|
||||
get_iterator_values(global_object, value, [&](Value& element) {
|
||||
get_iterator_values(global_object, value, [&](Value element) {
|
||||
if (interpreter.exception())
|
||||
return IterationDecision::Break;
|
||||
array->indexed_properties().append(element);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue