Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 8b125a1

Browse files
committed
Clean up
1 parent 27167e1 commit 8b125a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

framework/react/head.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function parse(
7171
): [{ type: string; props: Record<string, unknown> }[], ReactNode[]] {
7272
const els: { type: string; props: Record<string, unknown> }[] = [];
7373
const forwardNodes: ReactNode[] = [];
74-
const parseFn = (node: ReactNode) => {
74+
const walk = (node: ReactNode) => {
7575
Children.forEach(node, (child) => {
7676
if (!isValidElement(child)) {
7777
return;
@@ -80,7 +80,7 @@ function parse(
8080
const { type, props } = child;
8181
switch (type) {
8282
case Fragment:
83-
parseFn(props.children);
83+
walk(props.children);
8484
break;
8585

8686
// case InlineStyle:
@@ -94,7 +94,7 @@ function parse(
9494
case "meta":
9595
case "link":
9696
case "style":
97-
// remove the children prop of base/meta/link
97+
// remove the children prop of base/meta/link elements
9898
if (["base", "meta", "link"].includes(type) && "children" in props) {
9999
const { children: _, ...rest } = props;
100100
els.push({ type, props: rest });
@@ -106,6 +106,6 @@ function parse(
106106
});
107107
};
108108

109-
parseFn(node);
109+
walk(node);
110110
return [els, forwardNodes];
111111
}

0 commit comments

Comments
 (0)