We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b37e6a + 790682c commit 4abcaa5Copy full SHA for 4abcaa5
backbone.js
@@ -404,7 +404,11 @@
404
if (options.collection) this.collection = options.collection;
405
if (options.parse) attrs = this.parse(attrs, options) || {};
406
var defaults = _.result(this, 'defaults');
407
+
408
+ // Just _.defaults would work fine, but the additional _.extends
409
+ // is in there for historical reasons. See #3843.
410
attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
411
412
this.set(attrs, options);
413
this.changed = {};
414
this.initialize.apply(this, arguments);
0 commit comments