Selaa lähdekoodia

fix(ssr): update initial old value to watch callback in ssr usage (#4103)

ioslh 4 vuotta sitten
vanhempi
commit
20b6619793
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      packages/runtime-core/src/apiWatch.ts

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

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