fix(hydration): fix text mismatch warning

This commit is contained in:
Evan You 2020-04-29 17:07:41 -04:00
parent 08b4e8815d
commit e087b4e024

View File

@ -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
}