From 010f0f33b5a137bfa7b5ae2325d9113615e67a21 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 18 May 2020 08:12:27 +1000 Subject: [PATCH] use empty buffer if the other map is empty in dconf --- rslib/src/deckconf/schema11.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rslib/src/deckconf/schema11.rs b/rslib/src/deckconf/schema11.rs index cf7a1abfe..1ddcc354c 100644 --- a/rslib/src/deckconf/schema11.rs +++ b/rslib/src/deckconf/schema11.rs @@ -212,7 +212,11 @@ impl From for DeckConf { 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 { id: c.id,