Protect against {}

This commit is contained in:
kjeremy 2020-07-20 18:11:32 -04:00
parent adc4bb5406
commit a32dd9c478

View file

@ -178,7 +178,7 @@ impl Config {
pub fn update(&mut self, json: serde_json::Value) {
log::info!("Config::update({:#})", json);
if json.is_null() {
if json.is_null() || json.as_object().map_or(false, |it| it.is_empty()) {
return;
}