From 7a486392f1b7af4bc1050e2b71490a4e9274d952 Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Tue, 31 Jan 2012 10:21:56 -0500 Subject: [PATCH] ensure `options` is present --- backbone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.js b/backbone.js index bca4595a..f5ab94d9 100644 --- a/backbone.js +++ b/backbone.js @@ -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);