mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 23:48:45 +08:00
505d8b52b8
It'd be useful in cases like: ```gjs get flagNames() { return this.flags?.map((flag) => flag && `flag-${flag.name}`); // w/o this change you'd have to handle it here: // return this.flags?.map((flag) => flag && `flag-${flag.name}`).filter(Boolean).join(" "); } <template> <span class={{concatClass "gadget" this.flagNames}}> {{! …or here: }} <span class={{concatClass "gadget" (concatClass this.flagNames)}}> ``` (also: replaces ember's `compact()` with `filter(Boolean)`) |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |