Fixed #3809 - The esm builds throw an exception due to optional chaining

This commit is contained in:
mertsincan 2023-03-27 12:00:48 +01:00
parent ad6b71074a
commit a526e8f1b5
2 changed files with 2 additions and 2 deletions

View file

@ -160,7 +160,7 @@ function switchTheme(currentTheme, newTheme, linkElementId, callback) {
callback();
}
});
linkElement.parentNode?.insertBefore(cloneLinkElement, linkElement.nextSibling);
linkElement.parentNode && linkElement.parentNode.insertBefore(cloneLinkElement, linkElement.nextSibling);
}
export default {