From 566485a5c20d739bfe9c77c11b8ddfa09e292481 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 29 Dec 2022 15:10:02 +0100 Subject: [PATCH] fix: hogan to handlebars migration leftovers (#1461) --- .../uikit-workshop/src/scripts/components/panels-viewer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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');