lib/assets/javascripts/backbone_extensions/associations.js in backbone_extensions-0.0.9 vs lib/assets/javascripts/backbone_extensions/associations.js in backbone_extensions-0.0.10
- old
+ new
@@ -130,10 +130,10 @@
return associations;
}, {});
_(source).extend(associations, {
associations: function() {
- _(arguments).chain().toArray().each(function(options) {
+ _(arguments).chain().toArray().compact().each(function(options) {
_(associations).chain().keys().each(function(associationType) {
if (options[associationType]) {
associations[associationType].call(source, options[associationType], _(options).omit(associationType));
}
});