Skip to content

Commit

Permalink
Fix toSpliced mutate-while-iterating test
Browse files Browse the repository at this point in the history
  • Loading branch information
syg authored and Ms2ger committed Oct 25, 2022
1 parent c15d4be commit ade328d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ includes: [compareArray.js]
---*/

var arr = [0, 1, 2, 3];
var zerothElementStorage = arr[0];
Object.defineProperty(arr, "0", {
get() {
arr[1] = 42;
return 0;
return zerothElementStorage;
},
set(v) {
zerothElementStorage = v;
}
});
Object.defineProperty(arr, "2", {
Expand Down

0 comments on commit ade328d

Please sign in to comment.