Skip to content

Commit aecf620

Browse files
fix: use 'let' in an unwatch example as 'const' causes an error (#584)
1 parent 5d2a1e3 commit aecf620

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/instance-methods.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@
158158
If you still want to call an unwatch function inside the callback, you should check its availability first:
159159

160160
```js
161-
const unwatch = vm.$watch(
161+
let unwatch = null
162+
163+
unwatch = vm.$watch(
162164
'value',
163165
function() {
164166
doSomething()

0 commit comments

Comments
 (0)