]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(ssr): update initial old value to watch callback in ssr usage (#4103)
authorioslh <ohislh@gmail.com>
Mon, 19 Jul 2021 21:13:37 +0000 (05:13 +0800)
committerGitHub <noreply@github.com>
Mon, 19 Jul 2021 21:13:37 +0000 (17:13 -0400)
packages/runtime-core/src/apiWatch.ts

index 2c2d8964754912d8551433121ea73c22604afbff..4749bb7304d08c2bd690e18d0d980e79f4d2eabe 100644 (file)
@@ -265,7 +265,7 @@ function doWatch(
     } else if (immediate) {
       callWithAsyncErrorHandling(cb, instance, ErrorCodes.WATCH_CALLBACK, [
         getter(),
-        undefined,
+        isMultiSource ? [] : undefined,
         onInvalidate
       ])
     }