Browse Source

chore: fix types

Evan You 6 năm trước cách đây
mục cha
commit
e98c558bf3
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      packages/runtime-core/src/apiWatch.ts

+ 1 - 2
packages/runtime-core/src/apiWatch.ts

@@ -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)
     }
   }