hotfix(safari): Safari fix for window

This commit is contained in:
Adam Gospodarczyk 2022-04-30 11:01:40 +02:00
parent 28c6f5144c
commit 19b7ce51a4

View File

@ -16,6 +16,7 @@ const switchTheme = (e) => {
}
}
if (window) {
window.addEventListener('DOMContentLoaded', () => {
// Darkmode toggle
const toggleSwitch = document.querySelector('#darkmode-toggle')
@ -27,3 +28,5 @@ window.addEventListener('DOMContentLoaded', () => {
toggleSwitch.checked = true
}
})
}