ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 384 forks source link

Changing default to undefined instead of null #128

Closed derekchinn closed 9 years ago

derekchinn commented 9 years ago

When you try to compile a template later on, it barfs on line 467 in file express-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js because "options" is never set to an empty object, and therefore, the "in" operator on "null" is not possible. However, it should be an empty object, but is never set to one on line 461 (in the same file) because the comparison is on "undefined" instead of "null". Therefore, changing it so the comparison succeeds.