fix: theme not loading without config (#1631)

This commit is contained in:
Jae-Heon Ji 2022-08-02 23:15:33 +09:00 committed by GitHub
parent 68c5f1e051
commit 4e9ad2e694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,7 +270,10 @@ mod not_wasm {
if let Some(extension) = entry.path().extension() {
if extension == "yaml" || extension == "yml" {
if let Ok(themes) = ThemesFromYaml::from_path(&entry.path()) {
config.themes = config.themes.map(|t| t.merge(themes.into()));
match config.themes {
Some(t) => config.themes = Some(t.merge(themes.into())),
None => config.themes = Some(themes.into()),
}
}
}
}