mde / ejs

Embedded JavaScript templates -- http://ejs.co
Apache License 2.0
7.71k stars 846 forks source link

Ejs does not work when you pass 'client' in the options. #619

Closed atomic-junky closed 2 years ago

atomic-junky commented 3 years ago

When you put in the express options the keyword client, ejs is not working.

Example:

# server.js (using express)

app.get('\', (req, res) {
   res.render('./pages/index.ejs', {
      client: {
         version: '1.0.34'
      }
   })
})
# index.ejs

<!DOCTYPE html>
<html lang="en">
<head>
    <title>App</title>
</head>
<body>
    <%- include('./templates/app') %>
</body>
</html>

return an error:

include is not a function

And if you change client by an other word it's work!

eldritch-dev commented 2 years ago

Just run upon this error and found the same solution!