Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backbone-nested.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
var attrs = key;
for (var _attrStr in attrs) {
if (attrs.hasOwnProperty(_attrStr)) {
// Apply custom opts, related to a specific field
if (opts.byField && opts.byField[_attrStr]) {
opts = _.extend(opts, opts.byField[_attrStr]);
}

this._setAttr(newAttrs,
Backbone.NestedModel.attrPath(_attrStr),
opts.unset ? void 0 : attrs[_attrStr],
Expand Down