From 6febc92f244bd8b6f2aed781aa184ab8c52566ff Mon Sep 17 00:00:00 2001 From: Blake Kostner Date: Tue, 17 Oct 2023 12:00:04 -0600 Subject: [PATCH] update or helper handler --- src/handlebars.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlebars.ts b/src/handlebars.ts index f4d4395..a580adb 100644 --- a/src/handlebars.ts +++ b/src/handlebars.ts @@ -1,17 +1,17 @@ import Handlebars from "handlebars"; import isObject from "lodash/isObject"; -Handlebars.registerHelper("or", function (context, ...params) { +Handlebars.registerHelper("or", function (...params) { const options = params[params.length - 1]; params.pop(); for (const value of params) { if (value) { - return options.fn(context); + return options.fn(); } } - return options.inverse(context); + return options.inverse(); }); export default Handlebars;