mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
DEV: Allow transformed
values to be used in all widget hbs statements (#13331)
Previously, the `transformed.blah` shortcut could only be used in top-level hbs statements like {{transformed.blah}}. When attempting to use it in a sub-expression like `{{concat "hello" transformed.world}}`, it would raise a "transformed is not defined" error. This commit updates the shortcut logic to make `transformed.blah` and `attrs.blah` work consistently in all hbs expressions. Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
This commit is contained in:
@ -16,7 +16,7 @@ function sexpValue(value) {
|
||||
} else if (value.type === "SubExpression") {
|
||||
return sexp(value);
|
||||
}
|
||||
return pValue;
|
||||
return resolve(pValue);
|
||||
}
|
||||
|
||||
function pairsToObj(pairs) {
|
||||
|
Reference in New Issue
Block a user