-
Notifications
You must be signed in to change notification settings - Fork 2
Update to match snabbdom 3.5.0 #29
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
base: main
Are you sure you want to change the base?
Conversation
if (vnode.text.isEmpty || vnode.text != oldVnode.text) | ||
vnode.data.hook | ||
.flatMap(_.update) | ||
.foreach(hook => hook(oldVnode, vnode)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT in our case this becomes an optimization actually, since we were running these update hooks for text nodes already.
assertEquals(result1.length, 1) | ||
assertEquals(result2.length, 1) | ||
assertEquals(result2.length, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this is the optimization kicking-in, I believe. It only affects the text node, since the text is unchanged in this instance.
Codecov Report
@@ Coverage Diff @@
## main #29 +/- ##
==========================================
+ Coverage 86.16% 86.18% +0.02%
==========================================
Files 19 19
Lines 542 543 +1
Branches 60 53 -7
==========================================
+ Hits 467 468 +1
Misses 75 75
Continue to review full report at Codecov.
|
Not really sure what I'm doing, so please review carefully :)