File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >10.6.4 </Version >
4+ <Version >10.6.5-beta01 </Version >
55 </PropertyGroup >
66
77 <ItemGroup >
Original file line number Diff line number Diff line change @@ -702,10 +702,7 @@ export function getTheme(useLocalstorage = true) {
702702 theme = document . documentElement . getAttribute ( 'data-bs-theme' ) ;
703703 }
704704
705- if ( theme === null || theme === 'auto' ) {
706- theme = getAutoThemeValue ( ) ;
707- }
708- return theme ;
705+ return theme == null ? 'auto' : theme ;
709706}
710707
711708export function saveTheme ( theme ) {
@@ -719,8 +716,8 @@ export function getAutoThemeValue() {
719716}
720717
721718export function setTheme ( theme , sync ) {
722- if ( theme === 'auto' && window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ) {
723- document . documentElement . setAttribute ( 'data-bs-theme' , 'dark' )
719+ if ( theme === 'auto' ) {
720+ document . documentElement . setAttribute ( 'data-bs-theme' , getAutoThemeValue ( ) )
724721 }
725722 else {
726723 document . documentElement . setAttribute ( 'data-bs-theme' , theme ) ;
You can’t perform that action at this time.
0 commit comments