Skip to content

Commit 566485a

Browse files
authored
fix: hogan to handlebars migration leftovers (#1461)
1 parent 454292e commit 566485a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/uikit-workshop/src/scripts/components/panels-viewer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
/* eslint-disable no-param-reassign, no-unused-vars */
55

6-
import Handlebars from 'handlebars';
6+
import Handlebars from 'handlebars/dist/handlebars';
77
import pretty from 'pretty';
88
import { html, render } from 'lit-html';
99
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
@@ -176,7 +176,7 @@ export const panelsViewer = {
176176
// vanilla render of pattern data
177177
template = document.getElementById(panel.templateID);
178178
templateCompiled = Handlebars.compile(template.innerHTML);
179-
templateRendered = templateCompiled.render(patternData);
179+
templateRendered = templateCompiled(patternData);
180180
const normalizedCode =
181181
normalizeWhitespace.normalize(templateRendered);
182182
normalizedCode.replace(/[\r\n]+/g, '\n\n');
@@ -305,7 +305,7 @@ export const panelsViewer = {
305305
// render all of the panels in the base panel template
306306
const template = document.querySelector('.pl-js-panel-template-base');
307307
const templateCompiled = Handlebars.compile(template.innerHTML);
308-
templateRendered = templateCompiled.render(patternData);
308+
templateRendered = templateCompiled(patternData);
309309

310310
// make sure templateRendered is modified to be an HTML element
311311
const div = document.createElement('div');

0 commit comments

Comments
 (0)