allow empty ctor

This commit is contained in:
Kyle Spearrin 2018-05-17 13:25:03 -04:00
parent 33d690cbd5
commit ed89dfaba7
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,11 @@ export class AttachmentView implements View {
sizeName: string;
fileName: string;
constructor(a: Attachment) {
constructor(a?: Attachment) {
if (!a) {
return;
}
this.id = a.id;
this.url = a.url;
this.size = a.size;