Error calling index: index of untyped nil


#1

Hello,

I have an error, but it’s rendered correctly.
In my partial it gets the data, and it renders in the frontend.

{{ $data := index (index $.Site.Data $.Site.Language.Lang).usp "large" }}

but i have this error
at <index (index $.Site....>: error calling index: index of untyped nil

I have a more simpler approach now, but it will be nice to fix the above issue
{{ $data := (index $.Site.Data $.Site.Language.Lang).usp.large }}

All the best,
Erol


#2

I just stumbled on the same issue. In my case, if I keep your example, I want to pass “large” as a variable and can’t find any solution yet.