diff options
author | Darius Jahandarie <djahandarie@gmail.com> | 2023-06-10 10:00:29 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-10 10:00:29 +0900 |
commit | 145628c8aa3a28b3f267d2c1c75def0ec2942d4e (patch) | |
tree | b48bfb745ab4e74c3d44db4cb03856c9b8e8c7a9 /ext/js | |
parent | 8bf87390af026c7a09a73a14889e0065543c84aa (diff) | |
parent | 17b938a5c8c075f8e1f1ea37b91fb814411eeb59 (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')
-rw-r--r-- | ext/js/templates/sandbox/template-renderer.js | 3 |
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); } |