Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydration fails when write like "<div><span>123</span>{{value}}</div>" in the template and the data "value" is a empty string #11109

Open
deqwin opened this issue Feb 14, 2020 · 3 comments · May be fixed by #11111

Comments

@deqwin
Copy link

deqwin commented Feb 14, 2020

Version

2.6.11

Reproduction link

https://codepen.io/deqwin/pen/wvaMxoO

Steps to reproduce

open the reproduction above and you will see a red vue warning in the console

What is expected?

a successful hydration

What is actually happening?

the hydration fails and the app re-renders absolutely


this looks like the problem caused by the empty text node (src/core/vdom/patch.js line:646)

@enbo315
Copy link

enbo315 commented Mar 4, 2020

hello do well

@luohong123
Copy link

Hello,Modify it so that there is no error,beacuse,The client-side rendered virtual DOM tree is not matching server-rendered content. You have one more {{value}} .

<div id="app" data-server-rendered="true"><span>123</span></div>
<template id="tpl">
  <div id="app"><span>123</span></div>
</template>
@deqwin
Copy link
Author

deqwin commented Apr 13, 2020

Hello,Modify it so that there is no error,beacuse,The client-side rendered virtual DOM tree is not matching server-rendered content. You have one more {{value}} .

<div id="app" data-server-rendered="true"><span>123</span></div>
<template id="tpl">
  <div id="app"><span>123</span></div>
</template>

Yes, it works. But it's not easy to modify because i have written this many times in my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment