Skip to content

Commit f4954fe

Browse files
authored
Merge pull request #44 from indeyets/skip-unattached
🐛 Make sure, that singleton is attached
2 parents 29eb894 + 6ed1c1b commit f4954fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function initClientProvider() {
124124
if (element.parentNode != document.head) {
125125
document.head.appendChild(element);
126126
}
127-
if (lastVisited && lastVisited.ref) {
127+
if (lastVisited && lastVisited.ref && lastVisited.ref.parentNode) {
128128
document.head!.removeChild(lastVisited.ref);
129129
}
130130

0 commit comments

Comments
 (0)