Skip to content

Commit

Permalink
fix: banner NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
wkolod committed Dec 12, 2023
1 parent 1a5f910 commit c2b459a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Collection extends Node {
code: string;
creator: string;
owner: string;
banner: FileVersion;
banner?: FileVersion;
thumbnail?: FileVersion;
udl?: UDL;
ucm?: boolean;
Expand All @@ -23,7 +23,7 @@ export class Collection extends Node {
this.code = collectionProto.code;
this.creator = collectionProto.creator;
this.owner = collectionProto.owner;
this.banner = new FileVersion(collectionProto.banner);
this.banner = collectionProto.banner ? new FileVersion(collectionProto.banner): undefined;
this.thumbnail = collectionProto.thumbnail ? new FileVersion(collectionProto.thumbnail) : undefined;
this.udl = collectionProto.udl;
this.ucm = collectionProto.ucm;
Expand Down

0 comments on commit c2b459a

Please sign in to comment.