Allow partial-blocks to be executed without "options"
Closes #1341 If the @partial-block is called as parameter of a helper (like in {{#if @partial-block}}...{{/if}}, the partialBlockWrapper is executed without "options"-parameter. It should still work in without an error in such a case.
This commit is contained in:
committed by
Nils Knappmeier
parent
606fa55b0a
commit
a00c598266
@@ -237,7 +237,8 @@ export function invokePartial(partial, context, options) {
|
||||
options.data = createFrame(options.data);
|
||||
// Wrapper function to get access to currentPartialBlock from the closure
|
||||
let fn = options.fn;
|
||||
partialBlock = options.data['partial-block'] = function partialBlockWrapper(context, options) {
|
||||
partialBlock = options.data['partial-block'] = function partialBlockWrapper(context, options = {}) {
|
||||
|
||||
// Restore the partial-block from the closure for the execution of the block
|
||||
// i.e. the part inside the block of the partial call.
|
||||
options.data = createFrame(options.data);
|
||||
|
||||
Reference in New Issue
Block a user