From 95c13c4396d6b05e3c3d7d69acb1d5017b1819ed Mon Sep 17 00:00:00 2001 From: qvdw7213 Date: Fri, 8 Mar 2019 14:53:53 +0100 Subject: [PATCH] Fix problem rendering with same region name --- lib/client/layout.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/client/layout.js b/lib/client/layout.js index 46d7d59..5048d3e 100644 --- a/lib/client/layout.js +++ b/lib/client/layout.js @@ -66,8 +66,9 @@ BlazeLayout._updateRegions = function _updateRegions(regions) { _.each(regions, function(value, key) { // if this key does not yet exist then blaze // has no idea about this key and it won't get the value of this key - // so, we need to force a re-render - if(currentData && currentData[key] === undefined) { + // so, we need to force a re-render. + // needsRerender when new value of region is different from current one + if(value === undefined || (currentData && currentData[key]() !== value)) { needsRerender = true; // and, add the data function for this new key currentData[key] = BlazeLayout._buildRegionGetter(key);