Skip to content

Commit

Permalink
bugfix: Don't call tail on empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
jkciesluk committed Mar 22, 2024
1 parent 50f95ae commit f272158
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object InterpolatorCompletions:
completions,
snippetsEnabled,
hasStringInterpolator =
path.tail.headOption.exists(_.isInstanceOf[SeqLiteral]),
path.drop(1).headOption.exists(_.isInstanceOf[SeqLiteral]),
search,
buildTargetIdentifier,
)
Expand Down Expand Up @@ -177,7 +177,7 @@ object InterpolatorCompletions:
}.flatten

val qualType = for
parent <- path.tail.headOption.toList
parent <- path.drop(1).headOption.toList
if lit.span.exists && text.charAt(lit.span.point - 1) != '}'
identOrSelect <- path
.collectFirst(interpolatorMemberArg(lit, parent))
Expand Down

0 comments on commit f272158

Please sign in to comment.