Skip to content

Commit b3fdcce

Browse files
committed
refactor: remove InsertPosition
1 parent 5df8f0e commit b3fdcce

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/runtime-vapor/src/render.ts

+1-12
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,11 @@ export function normalizeContainer(container: string | ParentNode): ParentNode {
3030
: container
3131
}
3232

33-
export const enum InsertPosition {
34-
FIRST,
35-
LAST
36-
}
37-
3833
export function insert(
3934
block: Block,
4035
parent: ParentNode,
41-
anchor: Node | InsertPosition | null = null
36+
anchor: Node | null = null
4237
) {
43-
anchor =
44-
typeof anchor === 'number'
45-
? anchor === InsertPosition.FIRST
46-
? parent.firstChild
47-
: null
48-
: anchor
4938
// if (!isHydrating) {
5039
if (block instanceof Node) {
5140
parent.insertBefore(block, anchor)

0 commit comments

Comments
 (0)