Skip to content

Commit

Permalink
Fixed issue with dynamic inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
mbosecke committed Feb 22, 2014
1 parent 0741749 commit 26b720f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/mitchellbosecke/pebble/node/NodeRoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ private void compileBuildContentFunction(Compiler compiler) {
getBody().compile(compiler, true);
compiler.write("context.pushInheritanceChain(this);").newline();
compiler.write("getParent().buildContent(writer, context);").newline().outdent();
compiler.write("} else {").newline();
compiler.subcompile(getBody()).newline();
compiler.write("context.popInheritanceChain();").newline();
compiler.write("} else {").newline().indent();
compiler.subcompile(getBody()).newline().outdent();
compiler.write("}").newline();

} else {
Expand Down

0 comments on commit 26b720f

Please sign in to comment.