From 33e691301dc0cc8ff2a171bac1653365e8962d73 Mon Sep 17 00:00:00 2001
From: Patrick Ziegler
Date: Fri, 18 Dec 2020 23:33:03 +0100
Subject: [PATCH] fix(config): Don't treat an empty value as invalid (#2315)
An empty color value in the config should be treated as if no color was
specified (explicitly). This is the same behavior as before.
---
src/components/config.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/config.cpp b/src/components/config.cpp
index a94aaee2..5be2c223 100644
--- a/src/components/config.cpp
+++ b/src/components/config.cpp
@@ -225,6 +225,10 @@ chrono::duration config::convert(string&& value) const {
template <>
rgba config::convert(string&& value) const {
+ if (value.empty()) {
+ return rgba{};
+ }
+
rgba ret{value};
if (!ret.has_color()) {