1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

dont try to attachChildren if theres not htmlElement supplied

This commit is contained in:
Michael Shanks 2020-02-26 15:57:48 +00:00
parent 8c1c3329be
commit 4f2f2b9015

View file

@ -24,6 +24,8 @@ export const attachChildren = initialiseOpts => (htmlElement, options) => {
childNode.destroy()
}
if (!htmlElement) return
if (hydrate) {
while (htmlElement.firstChild) {
htmlElement.removeChild(htmlElement.firstChild)