Skip to content

Commit

Permalink
fix(theme): incorrect appearance scripts in head, close #211 (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo authored Sep 24, 2024
1 parent c8089f5 commit 52c954a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion theme/src/node/config/resolvePageHead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function resolvePageHead(page: Page, localeOptions: PlumeThemeLocaleOptio
const sm = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
const isDark = um === 'dark' || (um !== 'light' && sm);
document.documentElement.dataset.theme = isDark ? 'dark' : 'light';
}
})();`.replace(/^\s+|\s+$/gm, '').replace(/\n/g, ''),
])
}
Expand Down

0 comments on commit 52c954a

Please sign in to comment.