fix: island marker parsed as key marker (#1922)

This commit is contained in:
Marvin Hagemeister
2023-10-12 13:40:23 +02:00
committed by GitHub
parent 78b0b05fc3
commit 7d954584a6
5 changed files with 107 additions and 72 deletions
+2 -2
View File
@@ -326,10 +326,10 @@ function _walkInner(
vnodeStack.push(
h(PartialComp, { name, key, mode: +mode }) as VNode,
);
} else if (comment.startsWith("frsh-key")) {
} else if (comment.startsWith("frsh-key:")) {
const key = comment.slice("frsh-key:".length);
vnodeStack.push(h(Fragment, { key }) as VNode);
} else if (comment.startsWith("/frsh-key")) {
} else if (comment.startsWith("/frsh-key:")) {
const vnode = vnodeStack.pop();
const parent = vnodeStack[vnodeStack.length - 1]!;
addPropsChild(parent, vnode);