Skip to content

Commit 8c67db4

Browse files
ngxsonCISC
andauthored
Update common/jinja/runtime.cpp
Co-authored-by: Sigbjørn Skjæret <1629204+CISC@users.noreply.github.com>
1 parent 977e35c commit 8c67db4

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

common/jinja/runtime.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,11 +977,15 @@ std::string runtime::debug_dump_program(const program & prog, const std::string
977977
for (auto & [label, children_vec] : children) {
978978
oss << indent(lvl) << label << ":\n";
979979
lvl++;
980-
for (auto * child : children_vec) {
981-
if (!child) {
982-
continue;
980+
if (children_vec.empty()) {
981+
oss << indent(lvl) << "<empty>\n\n";
982+
} else {
983+
for (auto * child : children_vec) {
984+
if (!child) {
985+
continue;
986+
}
987+
child->visit(ctx);
983988
}
984-
child->visit(ctx);
985989
}
986990
lvl--;
987991
}

0 commit comments

Comments
 (0)