WW-5117 Restores previous behavior where tag was before action on stack

This commit is contained in:
Lukasz Lenart
2022-01-04 20:20:28 +01:00
parent 60e1212bcc
commit 3d39fba0db
@@ -148,16 +148,13 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
}
};
LOG.debug("Puts action on the top of ValueStack, just before the tag");
action = stack.pop();
LOG.debug("Push tag on top of the stack");
stack.push(templateContext.getTag());
stack.push(action);
try {
template.process(model, writer);
} finally {
stack.pop(); // removes action
stack.pop(); // removes tag
stack.push(action); // puts back action
LOG.debug("Removes tag from top of the stack");
stack.pop();
}
}