Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
elonehoo committed Jul 5, 2023
1 parent 0bec07c commit 0b80e61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const betweenChildren = (
let previousVNode: VNode | null = null

return replaceChildrenInternal(children, (vnode) => {
let insertedNodes: VNode | VNodeArrayChildren | string | number | void
let insertedNodes: VNode | VNodeArrayChildren | string | number | void = ''

if (previousVNode) {
insertedNodes = callback(previousVNode, vnode)
Expand Down
6 changes: 3 additions & 3 deletions test/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ describe('betweenChildren', () => {

expect(count).toBe(6)
expect(Array.isArray(nodes)).toBe(true)
expect(nodes).toHaveLength(2)
expect(nodes).toHaveLength(3)

compareChildren(startNodes, getStartNodes())

Expand Down Expand Up @@ -1245,8 +1245,8 @@ describe('betweenChildren', () => {

expect(nodes).toHaveLength(2)
expect(Array.isArray(nodes[0])).toBe(true)
expect(nodes[0]).toHaveLength(1)
expect(isVNode((nodes[0] as VNodeArrayChildren)[0])).toBe(true)
expect(nodes[0]).toHaveLength(2)
expect(isVNode((nodes[0] as VNodeArrayChildren)[0])).toBe(false)
expect(nodes[1]).toBe(startNodes[1])

expect(startNodes[0][0]).toBe('Text')
Expand Down

1 comment on commit 0b80e61

@vercel
Copy link

@vercel vercel bot commented on 0b80e61 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vnode-util-docs – ./

vnode-util-docs-git-main-elonehoo.vercel.app
vnode-util-docs-elonehoo.vercel.app
vnode-util.elonehoo.me

Please sign in to comment.