From e98c558bf3e7fc1cf8d8c83fd6144e272d7e4682 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 30 Oct 2019 11:29:08 -0400 Subject: [PATCH] chore: fix types --- packages/runtime-core/src/apiWatch.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 4a8248aa..9f530661 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/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) } }