We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
bug描述 当非HostComponent触发更新, commit阶段insertElement方法中,如果是如下结构:
HostComponent
commit
insertElement
<div> <List/> <p>我是谁不重要,关键是占了个位置</p> </div>
由于after为p对应DOM,会进入如下逻辑并返回,所以不会造成DOM更新
after
p
if (after === null && dom === parent.lastChild) { return; }
但当是如下结构时会进入insertBefore造成List对应DOM原地插入。
insertBefore
<div> <List/> </div>
为了解决这个bug,增加如下跳出条件:
// 如果目标dom的nextSibling和他已经存在的after相同,则跳出 if (dom.nextSibling && dom.nextSibling === after) { return; }
The text was updated successfully, but these errors were encountered:
fix: #9 (#10)
66b077d
chore(🤖):1.7.4 [skip ci]
3751dd5
## [1.7.4](v1.7.3...v1.7.4) (2020-11-03) ### Bug Fixes * [#9](#9) ([#10](#10)) ([66b077d](66b077d))
🎉 This issue has been resolved in version 1.7.4 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
bug描述
当非
HostComponent
触发更新,commit
阶段insertElement
方法中,如果是如下结构:由于
after
为p
对应DOM,会进入如下逻辑并返回,所以不会造成DOM更新但当是如下结构时会进入
insertBefore
造成List对应DOM原地插入。为了解决这个bug,增加如下跳出条件:
The text was updated successfully, but these errors were encountered: