From 55196c2766858fc54c8470b7c7cb1a055ae48155 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Sun, 4 Feb 2018 01:13:02 -0500 Subject: [PATCH] fix: prevent weird characters in date fields --- dist/helpers/handlebars-helpers.js | 2 +- src/helpers/handlebars-helpers.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/helpers/handlebars-helpers.js b/dist/helpers/handlebars-helpers.js index 982c231..65c1532 100644 --- a/dist/helpers/handlebars-helpers.js +++ b/dist/helpers/handlebars-helpers.js @@ -33,7 +33,7 @@ Template helper definitions for Handlebars. helpers.type = 'handlebars'; wrappedHelpers = _.mapObject(helpers, function(hVal, hKey) { if (_.isFunction(hVal)) { - _.wrap(hVal, function(func) { + return _.wrap(hVal, function(func) { var args; args = Array.prototype.slice.call(arguments); args.shift(); diff --git a/src/helpers/handlebars-helpers.coffee b/src/helpers/handlebars-helpers.coffee index e4ea69d..871e356 100644 --- a/src/helpers/handlebars-helpers.coffee +++ b/src/helpers/handlebars-helpers.coffee @@ -25,7 +25,7 @@ module.exports = ( theme, opts ) -> wrappedHelpers = _.mapObject helpers, ( hVal, hKey ) -> if _.isFunction hVal - _.wrap hVal, (func) -> + return _.wrap hVal, (func) -> args = Array.prototype.slice.call arguments args.shift() # lose the 1st element (func) args.pop() # lose the last element (the Handlebars options hash)