Comparing version 0.0.9 to 0.0.10
@@ -168,11 +168,20 @@ | ||
_.each(relations, function(constructor, key) { | ||
var _ref, _ref1; | ||
var _ref, _ref1, _ref2, _ref3; | ||
if (attrs[key] instanceof Backbone.Collection) { | ||
_this[key] = attrs[key]; | ||
if ((_ref = _this[key]) != null ? _ref.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
} else if (attrs[key] instanceof Backbone.Model) { | ||
_this[key] = attrs[key]; | ||
if ((_ref1 = _this[key]) != null ? _ref1.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
} else { | ||
if ((_ref = _this[key]) == null) { | ||
if ((_ref2 = _this[key]) == null) { | ||
_this[key] = new constructor(); | ||
} | ||
if ((_ref3 = _this[key]) != null ? _ref3.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
if (attrs[key]) { | ||
@@ -194,5 +203,2 @@ if (_.isString(attrs[key])) { | ||
} | ||
if ((_ref1 = _this[key]) != null ? _ref1.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
if (attrs[key]) { | ||
@@ -199,0 +205,0 @@ return delete attrs[key]; |
@@ -96,11 +96,20 @@ // Generated by CoffeeScript 1.3.3 | ||
_.each(relations, function(constructor, key) { | ||
var _ref, _ref1; | ||
var _ref, _ref1, _ref2, _ref3; | ||
if (attrs[key] instanceof Backbone.Collection) { | ||
_this[key] = attrs[key]; | ||
if ((_ref = _this[key]) != null ? _ref.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
} else if (attrs[key] instanceof Backbone.Model) { | ||
_this[key] = attrs[key]; | ||
if ((_ref1 = _this[key]) != null ? _ref1.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
} else { | ||
if ((_ref = _this[key]) == null) { | ||
if ((_ref2 = _this[key]) == null) { | ||
_this[key] = new constructor(); | ||
} | ||
if ((_ref3 = _this[key]) != null ? _ref3.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
if (attrs[key]) { | ||
@@ -122,5 +131,2 @@ if (_.isString(attrs[key])) { | ||
} | ||
if ((_ref1 = _this[key]) != null ? _ref1.setParent : void 0) { | ||
_this[key].setParent(_this); | ||
} | ||
if (attrs[key]) { | ||
@@ -127,0 +133,0 @@ return delete attrs[key]; |
{ "name": "highbrow" | ||
, "version": "0.0.9" | ||
, "version": "0.0.10" | ||
, "description": "A Backbone Base Framework" | ||
@@ -4,0 +4,0 @@ , "main": "lib" |
Sorry, the diff of this file is not supported yet
240636
3101