Skip to content
Browse files

prevent creating an undefined collectionKey if there is no reverse re…

…lation
  • Loading branch information...
1 parent 810e5cb commit c609f68bec6c69f9daf83cccb7e12df5efed0c4b @pgherveou pgherveou committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 backbone-relational.js
View
2 backbone-relational.js
@@ -690,7 +690,7 @@
console.warn( 'Relation=%o; collectionKey=%s already exists on collection=%o', this, key, this.options.collectionKey );
}
}
- else {
+ else if (key) {
collection[ key ] = this.instance;
}
}

0 comments on commit c609f68

Please sign in to comment.
Something went wrong with that request. Please try again.