Skip to content

Commit

Permalink
Merge pull request #3219 from RedSoxFan/swaymsg-object-success
Browse files Browse the repository at this point in the history
swaymsg: parse success of single object
  • Loading branch information
emersion authored Nov 29, 2018
2 parents cf1793b + e62ab6d commit fd37ded
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions swaymsg/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ static bool success_object(json_object *result) {
// Iterate results array and return false if any of them failed
static bool success(json_object *r, bool fallback) {
if (!json_object_is_type(r, json_type_array)) {
if (json_object_is_type(r, json_type_object)) {
return success_object(r);
}
return fallback;
}

Expand Down

0 comments on commit fd37ded

Please sign in to comment.