Skip to content

Commit

Permalink
Don't print extra comma for inline fragment w/o type condition
Browse files Browse the repository at this point in the history
Fixes #24.
  • Loading branch information
swolchok committed Feb 22, 2016
1 parent 8ac56ad commit b9c5efb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JsonVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ void JsonVisitor::endVisitInlineFragment(const InlineFragment &inlineFragment) {

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

out_ << ",\"directives\":";
out_ << "\"directives\":";
const auto *directives = inlineFragment.getDirectives();
if (directives != nullptr) {
printChildArray(nextChild, directives->size());
Expand Down

0 comments on commit b9c5efb

Please sign in to comment.