-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Make sure variables are always cast to a
Variables
instance
- Loading branch information
Showing
3 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2144,7 +2144,7 @@ Renderer.setMethod(function applySynchronousRenderElementOptions(element, option | |
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 2.0.0 | ||
* @version 2.3.1 | ||
* @version 2.4.0 | ||
* | ||
* @param {Element} element | ||
* @param {Object} options | ||
|
@@ -2242,7 +2242,7 @@ Renderer.setMethod(function applyElementOptions(element, options, for_sync_rende | |
if (options.variables) { | ||
|
||
if (!element[Hawkejs.VARIABLES]) { | ||
element[Hawkejs.VARIABLES] = {}; | ||
element[Hawkejs.VARIABLES] = this.prepareVariables({}); | ||
} | ||
|
||
for (i = 0; i < options.variables.length; i++) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2516,7 +2516,7 @@ function _resolveRender(err) { | |
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 2.1.3 | ||
* @version 2.2.9 | ||
* @version 2.4.0 | ||
* | ||
* @param {Function} fnc | ||
*/ | ||
|
@@ -2531,10 +2531,12 @@ Element.setMethod(function applyCompiledTemplate(fnc) { | |
|
||
let renderer = this.ensureHawkejsRenderer(); | ||
|
||
let render_vars = {}; | ||
let render_vars; | ||
|
||
if (this[Hawkejs.VARIABLES]) { | ||
Object.assign(render_vars, this[Hawkejs.VARIABLES]); | ||
render_vars = this[Hawkejs.VARIABLES].overlay(); | ||
} else { | ||
render_vars = renderer.prepareVariables({}); | ||
} | ||
|
||
Blast.defineGet(render_vars, 'self', () => { | ||
|