From 34df2b06951f27d7dc86a55e2fc61080f49c7d57 Mon Sep 17 00:00:00 2001 From: Robinhuett <5955614+Robinhuett@users.noreply.github.com> Date: Tue, 25 Dec 2018 21:03:13 +0100 Subject: [PATCH] fix(ALabel): Better fix for getIcon --- src/ALabel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ALabel.cpp b/src/ALabel.cpp index 7b26ef96..668d143b 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -90,7 +90,7 @@ std::string waybar::ALabel::getIcon(uint16_t percentage, const std::string& alt) { auto format_icons = config_["format-icons"]; 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]; } else { format_icons = format_icons["default"];