Skip to content
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

Why aren't the render_file and render_with_layout 'locals' parameter used? #102

Closed
dpolivy opened this issue Jul 23, 2015 · 2 comments
Closed
Labels

Comments

@dpolivy
Copy link
Contributor

dpolivy commented Jul 23, 2015

I've been debugging some other issues in the code, and am curious to understand why the render_file and render_with_layout functions are using the parent scope options object instead of the locals which is provided as a function parameter?

See L54 and L84.

As far as I can tell, these functions are called with the options parameter from the middleware function -- so it should be more performant to use the function parameter rather than try and use options from the parent scope, right?

@dougwilson
Copy link
Contributor

Hi @dpolivy I've started to maintain this module and am going through the issues. It seems like in the time since this was made, the links above don't seem to really go to the original place, so I'm not 100% sure where you are looking.

And even then, I wouldn't unfortunately know enough (yet) to be able to answer why something was done the way it was.

I would suggest that if you're experiencing a bug feel free to make a pull request or even open an issue explaining the bug / how to reproduce it.

@dpolivy
Copy link
Contributor Author

dpolivy commented Oct 1, 2019

@dougwilson If you look at something prior to v3.1.0 the links should go to the right place. It looks like I fixed this in this PR/commit: 720395b

Basically, there was a var locals = options; line in there that was extraneous, since locals was passed in as a parameter to the function already. It was a long time ago, but I think that's what this issue was about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants