Skip to content

Commit f1a1904

Browse files
committed
fix: invalid JSON export from empty grid result
Refs #2618
1 parent 7ea9f11 commit f1a1904

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
@@ -1217,7 +1217,8 @@ procedure TfrmExportGrid.btnOKClick(Sender: TObject);
12171217
tmp := '];' + CRLF;
12181218
end;
12191219
efJSON: begin
1220-
S.Size := S.Size - 1;
1220+
if NodeCount > 0 then
1221+
S.Size := S.Size - 1;
12211222
tmp := sLineBreak + CodeIndent + ']' + sLineBreak + '}';
12221223
end;
12231224
else

0 commit comments

Comments
 (0)