diff --git a/src/api/instance-methods.md b/src/api/instance-methods.md index f1025401ea..86b5516010 100644 --- a/src/api/instance-methods.md +++ b/src/api/instance-methods.md @@ -158,7 +158,9 @@ If you still want to call an unwatch function inside the callback, you should check its availability first: ```js - const unwatch = vm.$watch( + let unwatch = null + + unwatch = vm.$watch( 'value', function() { doSomething()