From 6d784205aed2b27ab92d4f7900253e442f4b0af1 Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Sat, 3 Oct 2020 22:02:47 +0100 Subject: [PATCH] fix: use 'let' in an unwatch example as 'const' causes an error --- src/api/instance-methods.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()