Open
Description
Using compat : true
and strict : true
as compiler options causes an exception when executing the template
require("handlebars").compile("{{v}}", { compat : true, strict : true })({ v : "a" })
node_modules\handlebars\dist\cjs\handlebars\runtime.js:111
if (!obj || !(name in obj)) {
^
TypeError: Cannot use 'in' operator to search for 'v' in a
at Object.strict (node_modules\handlebars\dist\cjs\handlebars\runtime.js:111:26)
at Object.eval [as main] (eval at createFunctionContext (node_modules\handlebars\dist\cjs\handlebars\compiler\javascript-compiler.js:262:23), <anonymous>:11:87)
at main (node_modules\handlebars\dist\cjs\handlebars\runtime.js:208:32)
at ret (node_modules\handlebars\dist\cjs\handlebars\runtime.js:212:12)
at ret (node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:519:21)
at Object.<anonymous> (index.js:9:80)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
Tested with version 4.7.7