Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ function walk(a, b, patch, index) { | |
} | ||
|
||
var apply = patch[index] | ||
var applyClear = false | ||
|
||
if (isThunk(a) || isThunk(b)) { | ||
thunks(a, b, patch, index) | ||
|
@@ -49,27 +50,22 @@ function walk(a, b, patch, index) { | |
} | ||
apply = diffChildren(a, b, patch, apply, index) | ||
} else { | ||
clearState(a, patch, index) | ||
apply = patch[index] | ||
apply = appendPatch(apply, new VPatch(VPatch.VNODE, a, b)) | ||
applyClear = true | ||
} | ||
} else { | ||
clearState(a, patch, index) | ||
apply = patch[index] | ||
apply = appendPatch(apply, new VPatch(VPatch.VNODE, a, b)) | ||
applyClear = true | ||
} | ||
} else if (isVText(b)) { | ||
if (!isVText(a)) { | ||
clearState(a, patch, index) | ||
apply = patch[index] | ||
apply = appendPatch(apply, new VPatch(VPatch.VTEXT, a, b)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mmckegg
Contributor
|
||
applyClear = true | ||
} else if (a.text !== b.text) { | ||
apply = appendPatch(apply, new VPatch(VPatch.VTEXT, a, b)) | ||
} | ||
} else if (isWidget(b)) { | ||
if (!isWidget(a)) { | ||
clearState(a, patch, index) | ||
apply = patch[index] | ||
applyClear = true; | ||
} | ||
|
||
apply = appendPatch(apply, new VPatch(VPatch.WIDGET, a, b)) | ||
|
@@ -78,6 +74,10 @@ function walk(a, b, patch, index) { | |
if (apply) { | ||
patch[index] = apply | ||
} | ||
|
||
if (applyClear) { | ||
clearState(a, patch, index) | ||
} | ||
} | ||
|
||
function diffProps(a, b) { | ||
|
Looks like you accidentally removed the VPatch appendpatch call