From 206d78538ccbc5e9543ee2bb2a93442b4b432534 Mon Sep 17 00:00:00 2001 From: Austin Siew <17107540+Aquafina-water-bottle@users.noreply.github.com> Date: Fri, 9 Jun 2023 16:16:10 -0600 Subject: Fix Handlebars not working on Firefox due to eval --- ext/js/templates/sandbox/template-renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/templates') diff --git a/ext/js/templates/sandbox/template-renderer.js b/ext/js/templates/sandbox/template-renderer.js index c3548b4f..df9fd79d 100644 --- a/ext/js/templates/sandbox/template-renderer.js +++ b/ext/js/templates/sandbox/template-renderer.js @@ -83,7 +83,7 @@ class TemplateRenderer { let instance = cache.get(template); if (typeof instance === 'undefined') { this._updateCacheSize(this._cacheMaxSize - 1); - instance = Handlebars.compile(template); + instance = Handlebars[handlebarsCompileFnName](template); cache.set(template, instance); } -- cgit v1.2.3 From 17b938a5c8c075f8e1f1ea37b91fb814411eeb59 Mon Sep 17 00:00:00 2001 From: Austin Siew <17107540+Aquafina-water-bottle@users.noreply.github.com> Date: Fri, 9 Jun 2023 16:46:10 -0600 Subject: Fix lint --- ext/js/templates/sandbox/template-renderer.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/js/templates') diff --git a/ext/js/templates/sandbox/template-renderer.js b/ext/js/templates/sandbox/template-renderer.js index df9fd79d..7179f366 100644 --- a/ext/js/templates/sandbox/template-renderer.js +++ b/ext/js/templates/sandbox/template-renderer.js @@ -18,6 +18,7 @@ /* global * Handlebars + * handlebarsCompileFnName */ class TemplateRenderer { -- cgit v1.2.3