Skip to content

Commit

Permalink
Correctly initialize variable in a loop.
Browse files Browse the repository at this point in the history
Fixes: #228
  • Loading branch information
mitar committed Jan 6, 2017
1 parent bcdea35 commit f579165
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/blaze/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,13 @@ ElementAttributesUpdater.prototype.update = function(newAttrs) {

for (var k in newAttrs) {
var handler = null;
var oldValue;
var oldValue = null;
var value = newAttrs[k];
if (! _.has(handlers, k)) {
if (value !== null) {
// make new handler
handler = Blaze._makeAttributeHandler(elem, k, value);
handlers[k] = handler;
oldValue = null;
}
} else {
handler = handlers[k];
Expand Down

0 comments on commit f579165

Please sign in to comment.