Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem re-rendering with same region name #82

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/client/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down