Skip to content

Commit fea3183

Browse files
committed
handled error for using strict and compat together
Signed-off-by: Seyed Mohammad Mahdi Hatami <hatamik7@gmail.com>
1 parent b4a54ad commit fea3183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/handlebars/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function template(templateSpec, env) {
116116
// Just add water
117117
let container = {
118118
strict: function (obj, name, loc) {
119-
if (!obj || !(name in obj)) {
119+
if (!obj || (typeof obj === 'object' && obj !== null && !(name in obj))) {
120120
throw new Exception('"' + name + '" not defined in ' + obj, {
121121
loc: loc,
122122
});

0 commit comments

Comments
 (0)