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.
This commit is contained in:
Patrick Ziegler 2020-12-18 23:33:03 +01:00 committed by GitHub
parent 1bf89e8b76
commit 33e691301d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,6 +225,10 @@ chrono::duration<double> config::convert(string&& value) const {
template <>
rgba config::convert(string&& value) const {
if (value.empty()) {
return rgba{};
}
rgba ret{value};
if (!ret.has_color()) {