summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2022-08-06 01:06:21 +0200
committerGitHub <noreply@github.com>2022-08-06 01:06:21 +0200
commitccd68049f727a52b59f8a432b132a16e683986e4 (patch)
treeec4385430b11f49db062e7b52fb9cae4cb59f0d9 /src
parentaa7177a9e4c1f7de722a51c516a1cda417439cac (diff)
parent206b7f4372dbbfb0efd23f347b19676b21ccb552 (diff)
Merge pull request #479 from rubyist/fix-json
output valid json when there are no clients
Diffstat (limited to 'src')
-rw-r--r--src/debug/HyprCtl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 2d11df69..5e28b96e 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -102,7 +102,8 @@ R"#({
}
// remove trailing comma
- result.pop_back();
+ if (result != "[")
+ result.pop_back();
result += "]";
} else {