Skip to content

Commit

Permalink
binding clears messagelist before setting val
Browse files Browse the repository at this point in the history
prevent double-errors in messagelist
  • Loading branch information
aaronj1335 committed Mar 14, 2013
1 parent 28bbd31 commit b4aa650
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/util/binding.js
Expand Up @@ -27,14 +27,14 @@ define([
var model, value, widget, self = this, prop = self.get('prop');
if ((widget = self.get('widget')) && (model = self.get('model'))) {
value = widget.getValue();
model.set(prop, value, {validate: true}).then(function() {
widget.clearStatus();
}, function(errors, changes) {
var error = errors.forField(prop);
if (error) {
self._handleSetFailure(prop, error);
}
});
widget.clearStatus();
model.set(prop, value, {validate: true})
.fail(function(errors, changes) {
var error = errors.forField(prop);
if (error) {
self._handleSetFailure(prop, error);
}
});
}
},
_setValueFromModel: function() {
Expand Down

0 comments on commit b4aa650

Please sign in to comment.