gobuffalo / plush

The powerful template system that Go needs
MIT License
901 stars 56 forks source link

If condition with array or map index #132

Closed paganotoni closed 3 years ago

paganotoni commented 3 years ago

Seems the following expression no longer works with the version we have on master:

 <%= if( flash["error"]) { %>

If crashes saying:

auth/login.plush.html: line 17: syntax error: invalid if condition, got (flash["error"])

cc @Mido-sys

Mido-sys commented 3 years ago

@paganotoni , I pushed a fix to allow array or map index in if condition.

paganotoni commented 3 years ago

Solved. Thanks!