We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 419b938 + 79b7f50 commit 03a4bf5Copy full SHA for 03a4bf5
1 file changed
src/main/java/com/hubspot/jinjava/interpret/JinjavaInterpreter.java
@@ -694,7 +694,10 @@ public void addError(TemplateError templateError) {
694
}
695
// fix line numbers not matching up with source template
696
if (!context.getCurrentPathStack().isEmpty()) {
697
- if (!templateError.getSourceTemplate().isPresent()) {
+ if (
698
+ !templateError.getSourceTemplate().isPresent() &&
699
+ context.getCurrentPathStack().peek().isPresent()
700
+ ) {
701
templateError.setMessage(
702
getWrappedErrorMessage(
703
context.getCurrentPathStack().peek().get(),
0 commit comments