Missing da causes invalid json

This commit is contained in:
softsimon committed 2024-06-22 10:52:01 +09:00
1 parent e1e4e79b68
commit c581be0e97
1 file changed
+1 -1
+1 -1
View File
@@ -1300,7 +1300,7 @@ class WebsocketHandler {
// and zips it together into a valid JSON object
private serializeResponse(response): string {
return '{'
+ Object.keys(response).map(key => `"${key}": ${response[key]}`).join(', ')
+ Object.keys(response).filter(key => response[key] != null).map(key => `"${key}": ${response[key]}`).join(', ')
+ '}';
}