fix: check json::value type

This commit is contained in:
Alexis
2018-10-26 09:27:16 +02:00
parent fd76e98552
commit 3f269ff463
10 changed files with 27 additions and 27 deletions

View File

@ -131,10 +131,10 @@ auto waybar::modules::Pulseaudio::update() -> void
auto format = format_;
if (muted_) {
format =
config_["format-muted"] ? config_["format-muted"].asString() : format;
config_["format-muted"].isString() ? config_["format-muted"].asString() : format;
label_.get_style_context()->add_class("muted");
} else if (port_name_.find("a2dp_sink") != std::string::npos) {
format = config_["format-bluetooth"]
format = config_["format-bluetooth"].isString()
? config_["format-bluetooth"].asString() : format;
label_.get_style_context()->add_class("bluetooth");
} else {