|
3 | 3 | */ |
4 | 4 | /* eslint-disable no-param-reassign, no-unused-vars */ |
5 | 5 |
|
6 | | -import Handlebars from 'handlebars'; |
| 6 | +import Handlebars from 'handlebars/dist/handlebars'; |
7 | 7 | import pretty from 'pretty'; |
8 | 8 | import { html, render } from 'lit-html'; |
9 | 9 | import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; |
@@ -176,7 +176,7 @@ export const panelsViewer = { |
176 | 176 | // vanilla render of pattern data |
177 | 177 | template = document.getElementById(panel.templateID); |
178 | 178 | templateCompiled = Handlebars.compile(template.innerHTML); |
179 | | - templateRendered = templateCompiled.render(patternData); |
| 179 | + templateRendered = templateCompiled(patternData); |
180 | 180 | const normalizedCode = |
181 | 181 | normalizeWhitespace.normalize(templateRendered); |
182 | 182 | normalizedCode.replace(/[\r\n]+/g, '\n\n'); |
@@ -305,7 +305,7 @@ export const panelsViewer = { |
305 | 305 | // render all of the panels in the base panel template |
306 | 306 | const template = document.querySelector('.pl-js-panel-template-base'); |
307 | 307 | const templateCompiled = Handlebars.compile(template.innerHTML); |
308 | | - templateRendered = templateCompiled.render(patternData); |
| 308 | + templateRendered = templateCompiled(patternData); |
309 | 309 |
|
310 | 310 | // make sure templateRendered is modified to be an HTML element |
311 | 311 | const div = document.createElement('div'); |
|
0 commit comments