Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


options.scope no longer has effect in render #122

hpaulj opened this Issue · 1 comment

1 participant


In ejs@0.8.3

test='this test in base'
console.log(ejs.render('<%= this.test %>'))
console.log(ejs.render('<%= this.test %>',{scope:{test:'in scope'}}))


this test in base
in scope

in ejs@0.8.4, both lines produce this test in base

This appears to be the result of #79 which wraps the template code in a function(){...}().

Using option._with:false, gets around this problem


I think this issue would be resolved by changing the template compile to produce


In other words, pass the scope through the new function layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.