Skip to content

Commit

Permalink
Changed collectionKey error to a warning, to preserve backwards compa…
Browse files Browse the repository at this point in the history
…tibility
  • Loading branch information
singingwolfboy committed Dec 19, 2011
1 parent 36dc6b2 commit 59686a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone-relational.js
Expand Up @@ -635,7 +635,7 @@
key = collectionKey;
}
if (collection[key] && collection[key] !== this.instance) {
throw new Error( 'collectionKey must not already exist on Backbone.Collection' );
Backbone.Relational.showWarnings && console && console.warn( 'Relation=%o; collectionKey=%s already exists on collection=%o', this, key, collection );
} else {
collection[key] = this.instance;
}
Expand Down

0 comments on commit 59686a1

Please sign in to comment.