Skip to content

Commit b9c5efb

Browse files
committed
Don't print extra comma for inline fragment w/o type condition
Fixes #24.
1 parent 8ac56ad commit b9c5efb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

JsonVisitor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ void JsonVisitor::endVisitInlineFragment(const InlineFragment &inlineFragment) {
261261

262262
auto nextChild = children.begin();
263263
if (inlineFragment.getTypeCondition() != nullptr) {
264-
out_ << "\"typeCondition\":" << *nextChild++;
264+
out_ << "\"typeCondition\":" << *nextChild++ << ',';
265265
}
266266

267-
out_ << ",\"directives\":";
267+
out_ << "\"directives\":";
268268
const auto *directives = inlineFragment.getDirectives();
269269
if (directives != nullptr) {
270270
printChildArray(nextChild, directives->size());

0 commit comments

Comments
 (0)