From 609f50545c9fe06541bad897921238b5bd15bb8d Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 14 Mar 2022 09:40:10 +0000 Subject: [PATCH] Fixed context in handlebars helpers --- lib/handlebarsHelpers.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/handlebarsHelpers.js b/lib/handlebarsHelpers.js index 8c950b6..8006265 100644 --- a/lib/handlebarsHelpers.js +++ b/lib/handlebarsHelpers.js @@ -2,7 +2,12 @@ const helpers = {}; -helpers.eq = (arg1, arg2, options) => - arg1 === arg2 ? options.fn(this) : options.inverse(this); +helpers.eq = function (arg1, arg2, options) { + return arg1 === arg2 ? options.fn(this) : options.inverse(this); +}; + +helpers.json = function (object) { + return JSON.stringify(object); +}; module.exports = helpers;