Skip to content

locals scope stopped working with EJS #46

@aarsilv

Description

@aarsilv

All local variables used to be scoped to locals but now that is no longer the case as locals is undefined in EJS templates rendered via partial()

e.g. the following now throws an error:

parent template:

<%- partial('user', {name: 'Aaron'}) ->

user partial template:

<h1>Hello, <%= locals.name %></h1>

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