Browse Source

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

ioslh 4 năm trước cách đây
mục cha
commit
20b6619793
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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
       ])
     }