mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-13 17:08:03 -05:00
Merge pull request #3625 from jridgewell/model-isValid-style
Use defaults in #isValid
This commit is contained in:
@@ -699,7 +699,7 @@
|
||||
|
||||
// Check if the model is currently in a valid state.
|
||||
isValid: function(options) {
|
||||
return this._validate({}, _.extend(options || {}, { validate: true }));
|
||||
return this._validate({}, _.defaults({validate: true}, options));
|
||||
},
|
||||
|
||||
// Run validation against the next complete set of model attributes,
|
||||
|
||||
Reference in New Issue
Block a user