From 40003237f25dac4c34965c607fc46d985626fca7 Mon Sep 17 00:00:00 2001 From: npharate Date: Fri, 26 May 2023 11:22:08 -0700 Subject: [PATCH] fix IndexOutOfBoundsException --- src/main/java/com/hubspot/jinjava/lib/tag/SetTag.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hubspot/jinjava/lib/tag/SetTag.java b/src/main/java/com/hubspot/jinjava/lib/tag/SetTag.java index 8df16bc52..2b05dc71e 100644 --- a/src/main/java/com/hubspot/jinjava/lib/tag/SetTag.java +++ b/src/main/java/com/hubspot/jinjava/lib/tag/SetTag.java @@ -249,7 +249,7 @@ public void executeSet( setVariable( interpreter, varTokens[0], - resolvedList != null ? resolvedList.get(0) : null + resolvedList != null && resolvedList.size() > 0 ? resolvedList.get(0) : null ); } }