From 206b7f4372dbbfb0efd23f347b19676b21ccb552 Mon Sep 17 00:00:00 2001 From: Scott Barron Date: Fri, 5 Aug 2022 18:53:19 -0400 Subject: [PATCH] output valid json when there are no clients --- src/debug/HyprCtl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {