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:
parent
1bf89e8b76
commit
33e691301d
@ -225,6 +225,10 @@ chrono::duration<double> config::convert(string&& value) const {
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
rgba config::convert(string&& value) const {
|
rgba config::convert(string&& value) const {
|
||||||
|
if (value.empty()) {
|
||||||
|
return rgba{};
|
||||||
|
}
|
||||||
|
|
||||||
rgba ret{value};
|
rgba ret{value};
|
||||||
|
|
||||||
if (!ret.has_color()) {
|
if (!ret.has_color()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user