You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a template contains an invalid index (e.g. elements.1 where elements only has 1 element) Stencil crashes with a fatal error.
In my opinion it would be better to throw if the index is out of bounds as the template is a user-written document and the assumption that a subscript index is correct doesn't hold.
I had a look through the code but couldn't figure out right away where this happens.
For variables I found one instance where the index wasn't checked, but not for context lookup for arrays:
current = array[index]
The text was updated successfully, but these errors were encountered:
tkrajacic
changed the title
index out of bounds should throw
Index out of bounds should throw
Oct 13, 2016
When a template contains an invalid index (e.g.
elements.1
where elements only has 1 element) Stencil crashes with a fatal error.In my opinion it would be better to throw if the index is out of bounds as the template is a user-written document and the assumption that a subscript index is correct doesn't hold.
I had a look through the code but couldn't figure out right away where this happens.
For variables I found one instance where the index wasn't checked, but not for context lookup for arrays:
current = array[index]
The text was updated successfully, but these errors were encountered: