We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 418aff7 commit 76d24beCopy full SHA for 76d24be
src/mount.ts
@@ -86,9 +86,12 @@ export function mount(
86
el.id = MOUNT_ELEMENT_ID
87
88
if (options?.attachTo) {
89
- const to = isString(options.attachTo)
90
- ? document.querySelector(options.attachTo)
91
- : options.attachTo
+ let to: Element
+ if (typeof options.attachTo === 'string') {
+ to = document.querySelector(options.attachTo)
92
+ } else {
93
+ to = options.attachTo
94
+ }
95
96
if (!to) {
97
throw new Error(
0 commit comments