Skip to content

Commit a0b5546

Browse files
kian23kptSplaktar
authored andcommittedJun 15, 2021
fix(material/theme): unselected theme picker
Fix unselected theme picker when localStorage is empty. Fixes #204
1 parent 057ed37 commit a0b5546

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎material.angular.io/src/app/shared/theme-picker/theme-picker.ts

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ export class ThemePicker implements OnInit, OnDestroy {
7575
const themeName = this._themeStorage.getStoredThemeName();
7676
if (themeName) {
7777
this.selectTheme(themeName);
78+
} else {
79+
this.themes.find(themes => {
80+
if (themes.isDefault === true) {
81+
this.selectTheme(themes.name);
82+
}
83+
});
7884
}
7985
}
8086

0 commit comments

Comments
 (0)
Please sign in to comment.