mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-22 21:38:00 -05:00
ensure options is present
This commit is contained in:
@@ -425,7 +425,7 @@
|
||||
attrs = _.extend({}, this.attributes, attrs);
|
||||
var error = this.validate(attrs, options);
|
||||
if (!error) return true;
|
||||
if (options.error) {
|
||||
if (options && options.error) {
|
||||
options.error(this, error, options);
|
||||
} else {
|
||||
this.trigger('error', this, error, options);
|
||||
|
||||
Reference in New Issue
Block a user