Răsfoiți Sursa

fix(hydration): fix text mismatch warning

Evan You 6 ani în urmă
părinte
comite
e087b4e024
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      packages/runtime-core/src/hydration.ts

+ 2 - 2
packages/runtime-core/src/hydration.ts

@@ -102,8 +102,8 @@ export function createHydrationFunctions(
           __DEV__ &&
             warn(
               `Hydration text mismatch:` +
-                `\n- Client: ${JSON.stringify(vnode.children)}`,
-              `\n- Server: ${JSON.stringify((node as Text).data)}`
+                `\n- Client: ${JSON.stringify((node as Text).data)}` +
+                `\n- Server: ${JSON.stringify(vnode.children)}`
             )
           ;(node as Text).data = vnode.children as string
         }