jcberquist / commandbox-cfformat

A CommandBox module for formatting CFML component files.
MIT License
22 stars 10 forks source link

Error on lambda functions #100

Closed gls7 closed 3 years ago

gls7 commented 3 years ago

With this code: arguments.prc.teacherSessions = prc.eligibility.sessions .filter(session => session.type == "fsy_teacher") .map(session => LSParseNumber(session.id));

I get this error: key [DELIMITED_ELEMENTS] doesn't exist \modules\commandbox-cfformat\models\Delimited.cfc: line 11

When I change it to this it works fine: arguments.prc.teacherSessions = prc.eligibility.sessions .filter((session) => session.type == "fsy_teacher") .map((session) => LSParseNumber(session.id));

Perhaps not using parens for the params is an "undocumented feature" in CF, but it's accepted and works.

jcberquist commented 3 years ago

Yes, Thanks for reporting this, it is definitely an issue with the single bare parameter.

jcberquist commented 3 years ago

This should be fixed in v0.15.16 - thanks again!