Skip to content

Commit 7764ba3

Browse files
committed
chore: use Node instead of Element
1 parent 78fcc0a commit 7764ba3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/vue-jsx-vapor/src/core/runtime.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function createFragment(
6767
return frag
6868
}
6969

70-
function normalizeNode(node: any, anchor?: Element): Block {
70+
function normalizeNode(node: any, anchor?: Node): Block {
7171
if (node instanceof Node || isFragment(node)) {
7272
anchor && (anchor.textContent = '')
7373
return node
@@ -91,7 +91,7 @@ function normalizeNode(node: any, anchor?: Element): Block {
9191
}
9292
}
9393

94-
function resolveValue(current: Block, value: any, anchor?: Element) {
94+
function resolveValue(current: Block, value: any, anchor?: Node) {
9595
const node = normalizeNode(value, anchor)
9696
if (current) {
9797
if (isFragment(current)) {
@@ -118,7 +118,7 @@ function resolveValue(current: Block, value: any, anchor?: Element) {
118118
return node
119119
}
120120

121-
function resolveValues(values: any[] = [], _anchor?: Element) {
121+
function resolveValues(values: any[] = [], _anchor?: Node) {
122122
const nodes: Block[] = []
123123
const frag = createFragment(nodes, _anchor)
124124
const scopes: EffectScope[] = []
@@ -139,7 +139,7 @@ function resolveValues(values: any[] = [], _anchor?: Element) {
139139
return frag
140140
}
141141

142-
export function setNodes(anchor: Element, ...values: any[]) {
142+
export function setNodes(anchor: Node, ...values: any[]) {
143143
const resolvedValues = resolveValues(values, anchor)
144144
anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor)
145145
}

0 commit comments

Comments
 (0)