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

Don't use extends keyword for objects

Open tandrewnichols opened this issue 9 years ago • 3 comments

So extends means "a" is a child of "b" . . . which turns out to be really bad with object literals. We didn't notice till we tried to pass opt.partials in addition to opt.settings.partials and started getting weird circular reference errors, where prototype and constructor were showing up when we dumped the partials.

This pull request adds a real extend method for partials and lambdas.

tandrewnichols avatar Aug 21 '14 20:08 tandrewnichols

Also, I was unsure what your process for compiling the coffeescript was. Is there some way that that just happens or do you manually compile?

tandrewnichols avatar Aug 21 '14 20:08 tandrewnichols

@vol4ok Is this still active?

tandrewnichols avatar Oct 07 '14 15:10 tandrewnichols

Seriously, you're misusing the extends key word. This is not what it's for.

tandrewnichols avatar Jun 08 '15 16:06 tandrewnichols