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 76d24be commit 8e36df4Copy full SHA for 8e36df4
src/mount.ts
@@ -89,15 +89,15 @@ export function mount(
89
let to: Element
90
if (typeof options.attachTo === 'string') {
91
to = document.querySelector(options.attachTo)
92
+ if (!to) {
93
+ throw new Error(
94
+ `Unable to find the element matching the selector ${options.attachTo} given as the \`attachTo\` option`
95
+ )
96
+ }
97
} else {
98
to = options.attachTo
99
}
100
- if (!to) {
- throw new Error(
- `Unable to find the element matching the selector ${options.attachTo} given as the \`attachTo\` option`
- )
- }
101
to.appendChild(el)
102
103
0 commit comments