]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: tweaks edison/fix/13510 13511/head
authordaiwei <daiwei521@126.com>
Thu, 3 Jul 2025 08:24:55 +0000 (16:24 +0800)
committerdaiwei <daiwei521@126.com>
Thu, 3 Jul 2025 08:24:55 +0000 (16:24 +0800)
packages/runtime-core/src/apiAsyncComponent.ts

index 25e6fa481ca4e75f7bd49b67ce5c00ab10638162..ab4ab51b66adea62c38e0bb7a4e602460d0a56be 100644 (file)
@@ -126,11 +126,13 @@ export function defineAsyncComponent<
       ;(instance.bu || (instance.bu = [])).push(() => (patched = true))
       const performHydrate = () => {
         // skip hydration if the component has been patched
-        if (__DEV__ && patched) {
-          warn(
-            `Skipping lazy hydration for component '${getComponentName(resolvedComp!) || resolvedComp!.__file}': ` +
-              `it was updated before lazy hydration performed.`,
-          )
+        if (patched) {
+          if (__DEV__) {
+            warn(
+              `Skipping lazy hydration for component '${getComponentName(resolvedComp!) || resolvedComp!.__file}': ` +
+                `it was updated before lazy hydration performed.`,
+            )
+          }
           return
         }
         hydrate()