Skip to content

Commit 5f70c58

Browse files
Gcaufyhefeng
authored and
hefeng
committed
refactor: use more accurate variable name (vuejs#7755)
1 parent daffdd5 commit 5f70c58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/core/instance/state.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function initWatch (vm: Component, watch: Object) {
292292

293293
function createWatcher (
294294
vm: Component,
295-
keyOrFn: string | Function,
295+
expOrFn: string | Function,
296296
handler: any,
297297
options?: Object
298298
) {
@@ -303,7 +303,7 @@ function createWatcher (
303303
if (typeof handler === 'string') {
304304
handler = vm[handler]
305305
}
306-
return vm.$watch(keyOrFn, handler, options)
306+
return vm.$watch(expOrFn, handler, options)
307307
}
308308

309309
export function stateMixin (Vue: Class<Component>) {

0 commit comments

Comments
 (0)