Skip to content

Fix for Dust path evaluation when used with Express >=2.5.9 #1

@swider

Description

@swider

Originally opened by @totherik against davglass/express-dust with a proposed fix

It may be broken in earlier versions, too, but in Express 2.5.9 res.locals isn't an object reference, but instead a getter. The action of pushing the getter method onto the context created a subtle bug where standard replacements worked, but paths did not. e.g. {foo} works, {foo.bar} fails.

The suggested fix should be backward compatible.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions