1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00

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()) {