diff --git a/dist/handlebars.js b/dist/handlebars.js index 1942eb53..4695f1c6 100644 --- a/dist/handlebars.js +++ b/dist/handlebars.js @@ -96,10 +96,9 @@ Handlebars.registerHelper('blockHelperMissing', function(context, options) { Handlebars.K = function() {}; -Handlebars.createFrame = Object.create || function(object) { - Handlebars.K.prototype = object; - var obj = new Handlebars.K(); - Handlebars.K.prototype = null; +Handlebars.createFrame = function(object) { + var obj = {}; + Handlebars.Utils.extend(obj, object); return obj; }; @@ -842,6 +841,8 @@ Handlebars.Utils = { }, escapeExpression: function(string) { + /*jshint eqnull: true */ + // don't escape SafeStrings, since they're already safe if (string instanceof Handlebars.SafeString) { return string.toString(); diff --git a/dist/handlebars.runtime.js b/dist/handlebars.runtime.js index 947b8f07..2372cb5b 100644 --- a/dist/handlebars.runtime.js +++ b/dist/handlebars.runtime.js @@ -96,10 +96,9 @@ Handlebars.registerHelper('blockHelperMissing', function(context, options) { Handlebars.K = function() {}; -Handlebars.createFrame = Object.create || function(object) { - Handlebars.K.prototype = object; - var obj = new Handlebars.K(); - Handlebars.K.prototype = null; +Handlebars.createFrame = function(object) { + var obj = {}; + Handlebars.Utils.extend(obj, object); return obj; }; @@ -231,6 +230,8 @@ Handlebars.Utils = { }, escapeExpression: function(string) { + /*jshint eqnull: true */ + // don't escape SafeStrings, since they're already safe if (string instanceof Handlebars.SafeString) { return string.toString();