Skip to content

Commit e7387d8

Browse files
committed
fix(node-utils): do not import utils from Vue package
1 parent 6e97ab3 commit e7387d8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/runtime/utils/node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text, type VNode } from 'vue'
1+
import { type VNode } from 'vue'
22
import type { MDCElement, MDCNode, MDCText } from '../types'
33

44
/**
@@ -32,7 +32,7 @@ export function isTag (vnode: VNode | MDCNode, tag: string | symbol): boolean {
3232
* Check if virtual node is text node
3333
*/
3434
export function isText (vnode: VNode | MDCNode): boolean {
35-
return isTag(vnode, 'text') || isTag(vnode, Text)
35+
return isTag(vnode, 'text') || isTag(vnode, Symbol.for('v-txt'))
3636
}
3737

3838
/**

test/extras.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { expect, it } from 'vitest'
2+
import { Text } from 'vue'
3+
4+
it('Vue.Text === Symbol.for(\'v-txt\')', async () => {
5+
expect(Text === Symbol.for('v-txt')).toBe(true)
6+
})

0 commit comments

Comments
 (0)