Vapor 3/Leaf 3: Inline Array Errors

I’m trying to pass in an inline array into a tag, for example

#count(["one", "two"])

I get the error:

{"error":true,"reason":"Expected ')' got '[' (\/Users\/mike\/Developer\/vaportest.genealabs.com\/Resources\/Views\/forms.leaf line: 2 column: 7 range: 15..<15)"}

column 7 corresponds to the opening bracket.

I would like to understand why this erring out, and if there is a workaround? Thanks for you help!

@0xtim Can you please help with this when you get a chance? Thank you - much appreciated! :]

I posted a bug report here: Error When Passing Inline Array Or Dict To Tag · Issue #27 · vapor/template-kit · GitHub

This topic was automatically closed after 166 days. New replies are no longer allowed.