Don't log JSON parse errors with no settings (#11459)
Release Notes: - Silenced error messages on startup when no settings/keymap files exist.
This commit is contained in:
parent
2e6d044bac
commit
f3fffc25c4
2 changed files with 13 additions and 4 deletions
|
@ -47,6 +47,9 @@ impl KeymapFile {
|
|||
}
|
||||
|
||||
pub fn parse(content: &str) -> Result<Self> {
|
||||
if content.is_empty() {
|
||||
return Ok(Self::default());
|
||||
}
|
||||
parse_json_with_comments::<Self>(content)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue