Skip to content

Commit

Permalink
fix: hogan to handlebars migration leftovers (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Dec 29, 2022
1 parent 454292e commit 566485a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 566485a

Please sign in to comment.