diff --git a/packages/uikit-workshop/src/scripts/components/panels-viewer.js b/packages/uikit-workshop/src/scripts/components/panels-viewer.js index a7989e978..f97cb4a79 100644 --- a/packages/uikit-workshop/src/scripts/components/panels-viewer.js +++ b/packages/uikit-workshop/src/scripts/components/panels-viewer.js @@ -3,7 +3,7 @@ */ /* eslint-disable no-param-reassign, no-unused-vars */ -import Handlebars from 'handlebars'; +import Handlebars from 'handlebars/dist/handlebars'; import pretty from 'pretty'; import { html, render } from 'lit-html'; import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; @@ -176,7 +176,7 @@ export const panelsViewer = { // vanilla render of pattern data template = document.getElementById(panel.templateID); templateCompiled = Handlebars.compile(template.innerHTML); - templateRendered = templateCompiled.render(patternData); + templateRendered = templateCompiled(patternData); const normalizedCode = normalizeWhitespace.normalize(templateRendered); normalizedCode.replace(/[\r\n]+/g, '\n\n'); @@ -305,7 +305,7 @@ export const panelsViewer = { // render all of the panels in the base panel template const template = document.querySelector('.pl-js-panel-template-base'); const templateCompiled = Handlebars.compile(template.innerHTML); - templateRendered = templateCompiled.render(patternData); + templateRendered = templateCompiled(patternData); // make sure templateRendered is modified to be an HTML element const div = document.createElement('div');