Comparing version 0.3.23 to 0.3.24
@@ -82,6 +82,4 @@ // Generated by CoffeeScript 1.6.2 | ||
if (this._compare(existingItem, newItem)) { | ||
if (this.field.options.ref) { | ||
existingItem.set(newItem); | ||
src.splice(i, 1); | ||
} | ||
existingItem.reset(newItem); | ||
src.splice(i, 1); | ||
break; | ||
@@ -88,0 +86,0 @@ } |
@@ -26,3 +26,3 @@ // Generated by CoffeeScript 1.6.2 | ||
CollectionMapper.__super__.constructor.call(this, field); | ||
this._refMapper = new ReferenceMapper(field); | ||
this._refMapper = new ReferenceMapper(field, true); | ||
} | ||
@@ -29,0 +29,0 @@ |
@@ -10,3 +10,3 @@ // Generated by CoffeeScript 1.6.2 | ||
(function() { | ||
var ReferenceMapper, _ref, | ||
var ReferenceMapper, | ||
__hasProp = {}.hasOwnProperty, | ||
@@ -18,5 +18,9 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
function ReferenceMapper() { | ||
_ref = ReferenceMapper.__super__.constructor.apply(this, arguments); | ||
return _ref; | ||
/* | ||
*/ | ||
function ReferenceMapper(field, _partOfCollection) { | ||
this._partOfCollection = _partOfCollection != null ? _partOfCollection : false; | ||
ReferenceMapper.__super__.constructor.call(this, field); | ||
} | ||
@@ -39,2 +43,4 @@ | ||
refModel = data; | ||
} else if (!this._partOfCollection && (refModel = model.get(this.field.path))) { | ||
refModel.reset(data); | ||
} else { | ||
@@ -41,0 +47,0 @@ refModel = this.field.root.service.model(this.field.options.ref, data, { |
{ | ||
"name": "linen", | ||
"version": "0.3.23", | ||
"version": "0.3.24", | ||
"description": "Linen (line-in) maps API's to [bindable](/classdojo/bindable.js) `objects`, and `collections`. At [classdojo](http://classdojo.com), we use `linen` to abstract our API from front-end, so we don't necessarily depend on any sort of API while developing new components. This allows us to rapidly build prototypes which can be wired up later.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8105719
143
243151