From 1b05c2834223ea25cd41359de7c6fce22d53f2a6 Mon Sep 17 00:00:00 2001 From: daiwei Date: Thu, 3 Jul 2025 16:24:55 +0800 Subject: [PATCH] chore: tweaks --- packages/runtime-core/src/apiAsyncComponent.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/runtime-core/src/apiAsyncComponent.ts b/packages/runtime-core/src/apiAsyncComponent.ts index 25e6fa481c..ab4ab51b66 100644 --- a/packages/runtime-core/src/apiAsyncComponent.ts +++ b/packages/runtime-core/src/apiAsyncComponent.ts @@ -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() -- 2.39.5