fix(ALabel): Better fix for getIcon

pull/128/head
Robinhuett 2018-12-25 21:03:13 +01:00
parent ad638357b5
commit 34df2b0695
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ std::string waybar::ALabel::getIcon(uint16_t percentage,
const std::string& alt) { const std::string& alt) {
auto format_icons = config_["format-icons"]; auto format_icons = config_["format-icons"];
if (format_icons.isObject()) { if (format_icons.isObject()) {
if (!alt.empty() && format_icons[alt].isArray()) { if (!alt.empty() && (format_icons[alt].isString() || format_icons[alt].isArray())) {
format_icons = format_icons[alt]; format_icons = format_icons[alt];
} else { } else {
format_icons = format_icons["default"]; format_icons = format_icons["default"];