marko 5.33.13 → 5.33.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -592,8 +592,13 @@ function morphdom(fromNode, toNode, host, componentsContext) {
592
592
  if (curFromNodeValue !== curToNodeValue) {
593
593
  if (
594
594
  isHydrate &&
595
+ toNextSibling &&
595
596
  curFromNodeType === TEXT_NODE &&
596
- curFromNodeValue.startsWith(curToNodeValue))
597
+ toNextSibling.bW_ === TEXT_NODE &&
598
+ curFromNodeValue.startsWith(curToNodeValue) &&
599
+ toNextSibling.cm_.startsWith(
600
+ curFromNodeValue.slice(curToNodeValue.length)
601
+ ))
597
602
  {
598
603
  // In hydrate mode we can use splitText to more efficiently handle
599
604
  // adjacent text vdom nodes that were merged.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.33.13",
3
+ "version": "5.33.14",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -592,8 +592,13 @@ function morphdom(fromNode, toNode, host, componentsContext) {
592
592
  if (curFromNodeValue !== curToNodeValue) {
593
593
  if (
594
594
  isHydrate &&
595
+ toNextSibling &&
595
596
  curFromNodeType === TEXT_NODE &&
596
- curFromNodeValue.startsWith(curToNodeValue)
597
+ toNextSibling.___nodeType === TEXT_NODE &&
598
+ curFromNodeValue.startsWith(curToNodeValue) &&
599
+ toNextSibling.___nodeValue.startsWith(
600
+ curFromNodeValue.slice(curToNodeValue.length),
601
+ )
597
602
  ) {
598
603
  // In hydrate mode we can use splitText to more efficiently handle
599
604
  // adjacent text vdom nodes that were merged.