Skip to content

Commit b1041ba

Browse files
committed
fix(import-wrappers): ensure the "useLazyHydration" composable is called at server-side
1 parent 7b84d7d commit b1041ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/create-hydration-wrapper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ export default function createHydrationWrapper(source, onSetup) {
9191
handleError(err, instance, 'async component loader');
9292
};
9393

94+
const loaded = ref(false);
95+
const result = useLazyHydration();
96+
9497
if (typeof window === 'undefined') {
9598
// on Server-side
9699
return load()
@@ -104,9 +107,6 @@ export default function createHydrationWrapper(source, onSetup) {
104107
});
105108
}
106109

107-
const loaded = ref(false);
108-
const result = useLazyHydration();
109-
110110
if (!result.willPerformHydration) {
111111
// already resolved
112112
if (resolvedComp) {

0 commit comments

Comments
 (0)