Skip to content

Commit bd33667

Browse files
authored
Merge pull request #121 from aboire/master
Fix #120 and #118 data context handling in `_load` to align with [email protected]
2 parents 36bee5b + 87b65e1 commit bd33667

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/renderer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ class BlazeRenderer {
246246

247247
_load(updateTemplate, updateLayout, current) {
248248
if (updateLayout && current.layout.view) {
249-
current.layout.view.dataVar.set(current.data);
249+
current.layout.view.dataVar.set(current.layout.view.dataVar.get()?.value ? { value: current.data ?? {} } : current.data);
250250
}
251251

252252
if (current.template.view && updateTemplate) {
253-
current.template.view.dataVar.set(current.data);
253+
current.template.view.dataVar.set(current.template.view.dataVar.get()?.value ? { value: current.data ?? {} } : current.data);
254254
this.isRendering = false;
255255
current.materialized = true;
256256
current.callback();

0 commit comments

Comments
 (0)