express-dust icon indicating copy to clipboard operation
express-dust copied to clipboard

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

Open swider opened this issue 12 years ago • 0 comments

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.

swider avatar May 30 '12 15:05 swider