website: fix the previous fix

This commit is contained in:
nym21
2024-12-13 16:08:59 +01:00
parent 9576f6e91e
commit f6f4660cd2

View File

@@ -1311,10 +1311,10 @@ function initFrameSelectors() {
function setAsideParent() {
const { clientWidth } = window.document.documentElement;
const { aside, body, main } = elements;
if (clientWidth >= consts.MEDIUM_WIDTH && aside.parentElement !== body) {
body.append(aside);
} else if (aside.parentElement !== main) {
main.append(aside);
if (clientWidth >= consts.MEDIUM_WIDTH) {
aside.parentElement !== body && body.append(aside);
} else {
aside.parentElement !== main && main.append(aside);
}
}