Skip to content

Error with @partial-block returning calling parent partial #1276

@alekbarszczewski

Description

@alekbarszczewski
// inline partial simply returning @partial-block
{{#*inline "myPartial"}}
  {{> @partial-block }}
{{/inline}}

// render partial
{{#> myPartial}}
  {{> myPartial}} // <-- @partial block should be empty for this invocation, but it is not...
{{/myPartial}}

When executing this template I get RangeError: Maximum call stack size exceeded.
It seems that recursive invocation of partial receives @partial-block from parent invocation of same partial. When passing @partial-block explicitly no error is thrown:

// inline partial simply returning @partial-block
{{#*inline "myPartial"}}
  {{> @partial-block }}
{{/inline}}

// render partial
{{#> myPartial}}
 {{#> myPartial}}{{/myPartial}} // <-- empty partial block works
{{/myPartial}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions