summaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-06-10 10:00:29 +0900
committerGitHub <noreply@github.com>2023-06-10 10:00:29 +0900
commit145628c8aa3a28b3f267d2c1c75def0ec2942d4e (patch)
treeb48bfb745ab4e74c3d44db4cb03856c9b8e8c7a9 /ext/js/templates/sandbox
parent8bf87390af026c7a09a73a14889e0065543c84aa (diff)
parent17b938a5c8c075f8e1f1ea37b91fb814411eeb59 (diff)
Merge pull request #171 from Aquafina-water-bottle/126_noeval_handlebars
Fix Handlebars not working on Firefox due to eval
Diffstat (limited to 'ext/js/templates/sandbox')
-rw-r--r--ext/js/templates/sandbox/template-renderer.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/templates/sandbox/template-renderer.js b/ext/js/templates/sandbox/template-renderer.js
index c3548b4f..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 {
@@ -83,7 +84,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);
}