Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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