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

chore: empty fragment diff optimize #1365

Merged
merged 4 commits into from
Sep 17, 2019
Merged

chore: empty fragment diff optimize #1365

merged 4 commits into from
Sep 17, 2019

Conversation

yuanyan
Copy link
Collaborator

@yuanyan yuanyan commented Sep 17, 2019

No description provided.

@yuanyan yuanyan requested a review from andycall September 17, 2019 06:31
@yuanyan yuanyan merged commit a2107f3 into master Sep 17, 2019
@delete-merged-branch delete-merged-branch bot deleted the native-fragment branch September 17, 2019 12:57
// like: [ [] ] -> [ [1, 2] ]
// 2. When prev fragment is empty and update to other type
// like: [ [], 1 ] -> [ 1, 2 ]
if (isFragmentParent && parent.length === 0 || isPrevFirstEmptyFragment) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isPrevFirstEmptyFragment这个变量感觉稍微有点无必要, 直接判断 prevFirstNativeNode == null 就行了?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants