diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js index 55eb1c1b0..858353730 100644 --- a/lib/handlebars/runtime.js +++ b/lib/handlebars/runtime.js @@ -43,11 +43,11 @@ export function template(templateSpec, env) { partial = env.VM.resolvePartial.call(this, partial, context, options); let result = env.VM.invokePartial.call(this, partial, context, options); - if (result == null && env.compile) { + if (result === null && env.compile) { options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); result = options.partials[options.name](context, options); } - if (result != null) { + if (result !== null) { if (options.indent) { let lines = result.split('\n'); for (let i = 0, l = lines.length; i < l; i++) { @@ -76,7 +76,7 @@ export function template(templateSpec, env) { lookup: function(depths, name) { const len = depths.length; for (let i = 0; i < len; i++) { - if (depths[i] && depths[i][name] != null) { + if (depths[i] && depths[i][name] !== null) { return depths[i][name]; } } @@ -137,7 +137,7 @@ export function template(templateSpec, env) { blockParams = templateSpec.useBlockParams ? [] : undefined; if (templateSpec.useDepths) { if (options.depths) { - depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; + depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths; } else { depths = [context]; } @@ -174,7 +174,7 @@ export function template(templateSpec, env) { export function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { function prog(context, options = {}) { let currentDepths = depths; - if (depths && context != depths[0]) { + if (depths && context !== depths[0]) { currentDepths = [context].concat(depths); }