diff --git a/test/built-ins/Array/prototype/toSpliced/mutate-while-iterating.js b/test/built-ins/Array/prototype/toSpliced/mutate-while-iterating.js index 7513ff2e501..e7f1f7b5713 100644 --- a/test/built-ins/Array/prototype/toSpliced/mutate-while-iterating.js +++ b/test/built-ins/Array/prototype/toSpliced/mutate-while-iterating.js @@ -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", {