1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-25 23:09:22 +00:00

Fix issue with empty links in banners

This commit is contained in:
Pierre HUBERT 2021-12-30 14:12:14 +01:00
parent 1d21ba0ecc
commit 5da5de1c4d

View File

@ -195,7 +195,11 @@ impl Config {
.collect(), .collect(),
link: parsed_banner["link"].as_str() link: parsed_banner["link"].as_str()
.map(str::to_string) .map(str::to_string)
.map(Self::parse_string_val), .map(Self::parse_string_val)
.and_then(|s| match s.is_empty() {
true => None,
false => Some(s)
}),
}) })
}; };