Skip to content

Commit

Permalink
Fix callback calls. See mikeric#650. Regression since mikeric#546
Browse files Browse the repository at this point in the history
  • Loading branch information
blikblum authored and Jean-Christophe Cazeaux committed Aug 7, 2016
1 parent f014ebd commit f948204
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/rivets/binders.js
Expand Up @@ -217,6 +217,24 @@ describe("Rivets.binders", function() {

Should(nestedEl.innerHTML).be.exactly("42");
});

it("does not throw when root scope is reset", function () {
el.setAttribute('rv-if', 'scope.error.errors');
el.innerHTML = '<div>{scope.error.errors.email}</div>';
model = {
scope: {
error: {
errors: {
email: 'not a valid address'
}
}
}
};
var view = rivets.bind(el, model);
(function(){
model.scope.error = {};
}).should.not.throw();
})
});

describe("Custom binder with no attribute value", function() {
Expand Down

0 comments on commit f948204

Please sign in to comment.