We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 213f136 commit 4f8f4dbCopy full SHA for 4f8f4db
src/core/observer/array.js
@@ -23,14 +23,7 @@ export const arrayMethods = Object.create(arrayProto)
23
.forEach(function (method) {
24
// cache original method
25
const original = arrayProto[method]
26
- def(arrayMethods, method, function mutator () {
27
- // avoid leaking arguments:
28
- // http://jsperf.com/closure-with-arguments
29
- let i = arguments.length
30
- const args = new Array(i)
31
- while (i--) {
32
- args[i] = arguments[i]
33
- }
+ def(arrayMethods, method, function mutator (...args) {
34
const result = original.apply(this, args)
35
const ob = this.__ob__
36
let inserted
0 commit comments