Skip to content

Commit

Permalink
🐛 Fix variables not being available for custom elements that require …
Browse files Browse the repository at this point in the history
…synchronous rendering
  • Loading branch information
skerit committed Sep 11, 2024
1 parent e0e0c67 commit 6408cfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.4.1 (WIP)

* Fix variables not being available for custom elements that require synchronous rendering

## 2.4.0 (2024-08-12)

* Use shorter compiled function body ids when not on development environment
Expand Down
4 changes: 2 additions & 2 deletions lib/element/custom_element.js
Original file line number Diff line number Diff line change
Expand Up @@ -2827,7 +2827,7 @@ function _resolveRender(err) {
*
* @author Jelle De Loecker <[email protected]>
* @since 2.1.3
* @version 2.4.0
* @version 2.4.1
*
* @param {Function} fnc
*/
Expand All @@ -2847,7 +2847,7 @@ Element.setMethod(function applyCompiledTemplate(fnc) {
if (this[Hawkejs.VARIABLES]) {
render_vars = this[Hawkejs.VARIABLES].overlay();
} else {
render_vars = renderer.prepareVariables();
render_vars = renderer.prepareVariables(renderer.current_variables).overlay();
}

addSelfAncestor(render_vars, this);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hawkejs",
"description": "Asynchronous Embedded JavaScript templates",
"version": "2.4.0",
"version": "2.4.1-alpha",
"author": "Jelle De Loecker <[email protected]>",
"keywords": [
"template",
Expand Down

0 comments on commit 6408cfd

Please sign in to comment.