From 5da5de1c4d8c07c43e061aba7f648fb827b91235 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 30 Dec 2021 14:12:14 +0100 Subject: [PATCH] Fix issue with empty links in banners --- src/data/config.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/config.rs b/src/data/config.rs index 42b20ff..7e18bc1 100644 --- a/src/data/config.rs +++ b/src/data/config.rs @@ -195,7 +195,11 @@ impl Config { .collect(), link: parsed_banner["link"].as_str() .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) + }), }) };