Skip to content

Commit

Permalink
handled error for using strict and compat together
Browse files Browse the repository at this point in the history
Signed-off-by: Seyed Mohammad Mahdi Hatami <[email protected]>
  • Loading branch information
smmhatami committed Jun 28, 2023
1 parent b4a54ad commit fea3183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlebars/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function template(templateSpec, env) {
// Just add water
let container = {
strict: function (obj, name, loc) {
if (!obj || !(name in obj)) {
if (!obj || (typeof obj === 'object' && obj !== null && !(name in obj))) {
throw new Exception('"' + name + '" not defined in ' + obj, {
loc: loc,
});
Expand Down

0 comments on commit fea3183

Please sign in to comment.