mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
use empty buffer if the other map is empty in dconf
This commit is contained in:
parent
7ec3f1ecc0
commit
010f0f33b5
1 changed files with 5 additions and 1 deletions
|
@ -212,7 +212,11 @@ impl From<DeckConfSchema11> for DeckConf {
|
||||||
c.other.insert("lapse".into(), val);
|
c.other.insert("lapse".into(), val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let other_bytes = serde_json::to_vec(&c.other).unwrap_or_default();
|
let other_bytes = if c.other.is_empty() {
|
||||||
|
vec![]
|
||||||
|
} else {
|
||||||
|
serde_json::to_vec(&c.other).unwrap_or_default()
|
||||||
|
};
|
||||||
|
|
||||||
DeckConf {
|
DeckConf {
|
||||||
id: c.id,
|
id: c.id,
|
||||||
|
|
Loading…
Reference in a new issue