Skip to content

Commit

Permalink
Merge pull request #124 from AddSearch/sc-10431/fix-registration-of-h…
Browse files Browse the repository at this point in the history
…elper-and-partial-for-precompiled-templates

feat: [sc-10431] Shopify Overlay widget & SRP bugs
  • Loading branch information
haoAddsearch authored Aug 22, 2024
2 parents 4bc7ad1 + 6c03f40 commit 3ff94b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/addsearch-search-ui.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/addsearch-search-ui.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "addsearch-search-ui",
"version": "0.8.12",
"version": "0.8.13",
"description": "JavaScript library to develop Search UIs for the web",
"main": "./dist/addsearch-search-ui.min.js",
"jsdelivr": "./dist/addsearch-search-ui.min.js",
Expand Down
6 changes: 4 additions & 2 deletions src/util/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ export function registerDefaultHelpers() {

export function registerHelper(helperName, helperFunction) {
handlebars.registerHelper(helperName, helperFunction);
HandlebarsRuntime.registerHelper(helperName, helperFunction);
const HandlebarsRunTime = (typeof window !== 'undefined' && window.Handlebars) ? window.Handlebars : HandlebarsRuntime;
HandlebarsRunTime.registerHelper(helperName, helperFunction);
}
export function registerPartial(partialName, partialTemplate) {
handlebars.registerPartial(partialName, partialTemplate);
HandlebarsRuntime.registerPartial(partialName, partialTemplate);
const HandlebarsRunTime = (typeof window !== 'undefined' && window.Handlebars) ? window.Handlebars : HandlebarsRuntime;
HandlebarsRunTime.registerPartial(partialName, partialTemplate);
}

0 comments on commit 3ff94b3

Please sign in to comment.