Skip to content

fix Response.render#145

Open
artem-burlakov-ext-orion wants to merge 1 commit into
nodosjs:masterfrom
artem-burlakov-ext-orion:fix_render_branch
Open

fix Response.render#145
artem-burlakov-ext-orion wants to merge 1 commit into
nodosjs:masterfrom
artem-burlakov-ext-orion:fix_render_branch

Conversation

@artem-burlakov-ext-orion

Copy link
Copy Markdown

before:

render(locals = {}, template = this.templateName) {
    this.responseType = 'rendering';
    // FIXME: check if property already exists
    Object.assign(this.locals, locals);
    this.templateName = template;
  }

after:

render(locals = {}, template = this.templateName) {
    this.responseType = 'rendering';
    const self = this;
    Object.entries(locals).forEach(([key, value]) => self.addLocal(key, value));
    this.templateName = template;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant