]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix types
authorEvan You <yyx990803@gmail.com>
Wed, 30 Oct 2019 15:29:08 +0000 (11:29 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 30 Oct 2019 15:29:08 +0000 (11:29 -0400)
packages/runtime-core/src/apiWatch.ts

index 4a8248aa0a365ba677345cae9c944d0783c01dfb..9f530661b29adeffe5ab222d806e90849d89ddc1 100644 (file)
@@ -138,8 +138,7 @@ function doWatch(
 
   let cleanup: Function
   const registerCleanup: CleanupRegistrator = (fn: () => void) => {
-    // TODO wrap the cleanup fn for error handling
-    cleanup = runner.onStop = () => {
+    cleanup = runner.options.onStop = () => {
       callWithErrorHandling(fn, instance, ErrorCodes.WATCH_CLEANUP)
     }
   }