ensure options is present

This commit is contained in:
Brad Dunbar
2012-01-31 10:21:56 -05:00
parent db95e2c1fb
commit 7a486392f1

View File

@@ -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);