Skip to content

Commit f2b476d

Browse files
committed
refactor: avoid leading semi
1 parent eaf6b54 commit f2b476d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: src/core/observer/array.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ import { def } from '../util/index'
88
const arrayProto = Array.prototype
99
export const arrayMethods = Object.create(arrayProto)
1010

11-
/**
12-
* Intercept mutating methods and emit events
13-
*/
14-
;[
11+
const methodsToPatch = [
1512
'push',
1613
'pop',
1714
'shift',
1815
'unshift',
1916
'splice',
2017
'sort',
2118
'reverse'
22-
].forEach(function (method) {
19+
]
20+
21+
/**
22+
* Intercept mutating methods and emit events
23+
*/
24+
methodsToPatch.forEach(function (method) {
2325
// cache original method
2426
const original = arrayProto[method]
2527
def(arrayMethods, method, function mutator (...args) {

0 commit comments

Comments
 (0)