Update icon theme fallback to use default theme (#38485)
https://github.com/zed-industries/zed/pull/38367 introduced panic: ``` thread 'main' panicked at crates/theme/src/settings.rs:812:18: called `Option::unwrap()` on a `None` value ``` In this PR I restored fallback logic from the original code - before settings refactor. Release Notes: - N/A
This commit is contained in:
@@ -808,7 +808,7 @@ impl settings::Settings for ThemeSettings {
|
|||||||
theme_overrides: HashMap::default(),
|
theme_overrides: HashMap::default(),
|
||||||
active_icon_theme: themes
|
active_icon_theme: themes
|
||||||
.get_icon_theme(icon_theme_selection.icon_theme(*system_appearance))
|
.get_icon_theme(icon_theme_selection.icon_theme(*system_appearance))
|
||||||
.ok()
|
.or_else(|_| themes.default_icon_theme())
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
icon_theme_selection: Some(icon_theme_selection),
|
icon_theme_selection: Some(icon_theme_selection),
|
||||||
ui_density: content.ui_density.unwrap_or_default().into(),
|
ui_density: content.ui_density.unwrap_or_default().into(),
|
||||||
|
|||||||
Reference in New Issue
Block a user