diff options
| author | Scott Barron <scott@barron.io> | 2022-08-05 18:53:19 -0400 |
|---|---|---|
| committer | Scott Barron <scott@barron.io> | 2022-08-05 18:53:19 -0400 |
| commit | 206b7f4372dbbfb0efd23f347b19676b21ccb552 (patch) | |
| tree | ec4385430b11f49db062e7b52fb9cae4cb59f0d9 /src/debug/HyprCtl.cpp | |
| parent | aa7177a9e4c1f7de722a51c516a1cda417439cac (diff) | |
output valid json when there are no clients
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 3 |
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 { |
