mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 14:49:07 +08:00
FIX: darkMode availiability detection was broken (#17207)
This regressed on 2f66eb5
where CSS was moved from the HTML document
head to the body.
Bug report at https://meta.discourse.org/t/-/230656?u=falco
This commit is contained in:
parent
684bc821be
commit
a0f3ec7b13
|
@ -70,9 +70,8 @@ export default {
|
|||
}
|
||||
|
||||
session.darkModeAvailable =
|
||||
document.head.querySelectorAll(
|
||||
'link[media="(prefers-color-scheme: dark)"]'
|
||||
).length > 0;
|
||||
document.querySelectorAll('link[media="(prefers-color-scheme: dark)"]')
|
||||
.length > 0;
|
||||
|
||||
session.defaultColorSchemeIsDark = setupData.colorSchemeIsDark === "true";
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user