Manually create a new document for second collection

This commit is contained in:
Jori Lallo
2017-07-17 23:30:16 -07:00
parent 63288227db
commit bbbf17c223
7 changed files with 115 additions and 60 deletions

View File

@ -26,7 +26,9 @@ class Collection {
/* Computed */
@computed get entryUrl(): string {
return this.type === 'atlas' ? this.documents[0].url : this.url;
return this.type === 'atlas' && this.documents.length > 0
? this.documents[0].url
: this.url;
}
/* Actions */