-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Fixed async helpers nested in template helpers #10750
Conversation
This PR updates the I'm wondering if the current way was intentional, and this change would be a regression @ErisDS ?
If this is a regression, we can fix it in |
Nothing intentional, but IMO using .merge/.extends to override the first variable AND assigning is an antipattern due as it looks like the first variable has been unexpectedly overridden. IMO should be one or the other. |
d722d27
to
58599ff
Compare
@ErisDS I've updated to simply assign to |
58599ff
to
a5edad3
Compare
I've also remove the assigning options.hash because both helpers are just
used without arguments or hash e.g. {{navigation}} {{pagination}}
This is incorrect. We want to be able to pass variables to these templates,
if you look up my previous commit on these helpers you’ll find history of
this change with the relevant issue.
…On Mon, 10 Jun 2019 at 07:47, allouis ***@***.***> wrote:
@ErisDS <https://github.com/ErisDS> I've updated to simply assign to this
rather than _.merge and assign to new identifier.
I've also remove the assigning options.hash because both helpers are just
used without arguments or hash e.g. {{navigation}} {{pagination}}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10750?email_source=notifications&email_token=AAAYZCPI4LDCKGXTWSA3ZDLPZX2JLA5CNFSM4HOAVLF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXJCEQA#issuecomment-500310592>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAYZCJTGASW7MCETYVU46LPZX2JLANCNFSM4HOAVLFQ>
.
|
@ErisDS Rebased to reinstate this functionality |
000d65d
to
0ed228b
Compare
closes TryGhost#10643 The async resolver in express-hbs relies on storing the state of the promises on the `this` value inside of a helper, which is always set to the `context`. This patch updates our helpers which render templates, to use `this` as the context when rendering their templates.
no-issue ronseal.
0ed228b
to
696f124
Compare
closes #10643
The async resolver in express-hbs relies on storing the state of the
promises on the
this
value inside of a helper, which is always set tothe
context
. This patch updates our helpers which render templates, touse
this
as the context when rendering their templates.