mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibJS: Call Array.prototype.find() callback for empty elements
If the array value at the current index is empty, the callback will be called with undefined as value.
This commit is contained in:
parent
ad8abce8a5
commit
823cc7bc1c
3 changed files with 27 additions and 7 deletions
|
@ -9,7 +9,7 @@ try {
|
|||
callbackCalled++;
|
||||
a.pop();
|
||||
});
|
||||
assert(callbackCalled === 3);
|
||||
assert(callbackCalled === 5);
|
||||
|
||||
callbackCalled = 0;
|
||||
a = [1, 2, 3, 4, 5];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue