Explorar o código

refactor: use more accurate variable name (#7755)

Gcaufy %!s(int64=8) %!d(string=hai) anos
pai
achega
6931a47c5c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/core/instance/state.js

+ 2 - 2
src/core/instance/state.js

@@ -292,7 +292,7 @@ function initWatch (vm: Component, watch: Object) {
 
 function createWatcher (
   vm: Component,
-  keyOrFn: string | Function,
+  expOrFn: string | Function,
   handler: any,
   options?: Object
 ) {
@@ -303,7 +303,7 @@ function createWatcher (
   if (typeof handler === 'string') {
     handler = vm[handler]
   }
-  return vm.$watch(keyOrFn, handler, options)
+  return vm.$watch(expOrFn, handler, options)
 }
 
 export function stateMixin (Vue: Class<Component>) {