Skip to content

Commit

Permalink
fix HBS compile call
Browse files Browse the repository at this point in the history
  • Loading branch information
esheyw committed Jan 29, 2024
1 parent 77bff76 commit 8704dba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@

## Version 0.2.6
- Attempt new foundry package release API
- Update MHLDialog's template-as-content support to allow prototype method and property use, matching the behaviour of foundry's `renderTemplate()`
- Update MHLDialog's template-as-content support to allow prototype method and property use, matching the behaviour of foundry's `renderTemplate()`

## Version 0.2.7
- *Actually* update the template call properly.
5 changes: 1 addition & 4 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
- fix token settings on dropHeldTorch
- brushup the group initiative skills dialog macro
- implement current column
- account for lores known by all selected
- finish localization
- foundry package release api
- double check CSS on various themes/no-dorako
- npm package setup, run link dev
- or just a standalone script
4 changes: 2 additions & 2 deletions scripts/classes/MHLDialog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export class MHLDialog extends Dialog {
if (/\.(hbs|html)$/.test(data.content)) {
data.content = await renderTemplate(originalContent, data);
} else {
data.content = Handlebars.compile(originalContent, {
data.content = Handlebars.compile(originalContent)(data, {
allowProtoMethodsByDefault: true,
allowProtoPropertiesByDefault: true,
})(data);
});
}
data.content ||= localize(`${PREFIX}.Error.TemplateFailure`);
}
Expand Down

0 comments on commit 8704dba

Please sign in to comment.