fix: check type

pull/62/head
Alexis 2018-10-26 10:12:34 +02:00
parent f20441fa92
commit 63e86fbe9e
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,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]) {
if (!alt.empty() && format_icons[alt].isString()) {
format_icons = format_icons[alt];
} else {
format_icons = format_icons["default"];