You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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?
The text was updated successfully, but these errors were encountered:
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.
@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.
I've been debugging some other issues in the code, and am curious to understand why the
render_file
andrender_with_layout
functions are using the parent scopeoptions
object instead of thelocals
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 useoptions
from the parent scope, right?The text was updated successfully, but these errors were encountered: