Skip to content

Commit 4c196b9

Browse files
committed
fix: invalid JSON export from empty grid result
Closes #2618
1 parent bf0463b commit 4c196b9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎source/exportgrid.pas‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,8 @@ procedure TfrmExportGrid.btnOKClick(Sender: TObject);
12271227
tmp := '];' + CRLF;
12281228
end;
12291229
efJSON: begin
1230-
S.Size := S.Size - 1;
1230+
if NodeCount > 0 then
1231+
S.Size := S.Size - 1;
12311232
tmp := sLineBreak + CodeIndent + ']' + sLineBreak + '}';
12321233
end;
12331234
else

0 commit comments

Comments
 (0)