]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: only wrap during tests
authorEvan You <yyx990803@gmail.com>
Thu, 26 Jan 2023 12:59:30 +0000 (20:59 +0800)
committerEvan You <yyx990803@gmail.com>
Thu, 26 Jan 2023 12:59:30 +0000 (20:59 +0800)
packages/runtime-core/src/renderer.ts

index 3a4608681f965c8b60337933496f03cef4f4439c..b1e048e588b425518b58fdba4e6be7517c1fe9f2 100644 (file)
@@ -271,8 +271,11 @@ export const enum MoveType {
 }
 
 export const queuePostRenderEffect = __FEATURE_SUSPENSE__
-  ? (fn: Function | Function[], suspense: SuspenseBoundary | null) =>
-      queueEffectWithSuspense(fn, suspense)
+  ? __TEST__
+    ? // vitest can't seem to handle eager circular dependency
+      (fn: Function | Function[], suspense: SuspenseBoundary | null) =>
+        queueEffectWithSuspense(fn, suspense)
+    : queueEffectWithSuspense
   : queuePostFlushCb
 
 /**