Backbone.View option handling tweak.

This commit is contained in:
Jeremy Ashkenas
2010-10-05 16:24:25 -04:00
parent 2ca43eaa5f
commit 3190a5a7f4

View File

@@ -449,7 +449,7 @@
Backbone.View = function(options) {
this.modes = {};
this.configure(options || {});
this.configure(options);
if (this.options.el) {
this.el = this.options.el;
} else {
@@ -474,6 +474,7 @@
tagName : 'div',
configure : function(options) {
options || (options = {});
if (this.options) options = _.extend({}, this.options, options);
if (options.model) this.model = options.model;
if (options.collection) this.collection = options.collection;