Skip to content

Commit

Permalink
add safety checks for folders
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika committed Jul 4, 2018
1 parent 29f4b64 commit eb40e52
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/app/components/info-drawer/info-drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,15 @@ export class InfoDrawerComponent implements OnChanges {
}
}

private hasAspectNames(entry: MinimalNodeEntryEntity) {
private hasAspectNames(entry: MinimalNodeEntryEntity): boolean {
return entry.aspectNames && entry.aspectNames.includes('exif:exif');
}

private isTypeImage(entry) {
return entry.content.mimeType.includes('image/');
private isTypeImage(entry: MinimalNodeEntryEntity): boolean {
if (entry && entry.content && entry.content.mimeType) {
return entry.content.mimeType.includes('image/');
}
return false;
}

private loadNodeInfo(nodeId: string) {
Expand Down

0 comments on commit eb40e52

Please sign in to comment.