[ADF-3324] Preview - unshared file breaks preview (#3580)

This commit is contained in:
Suzana Dirla
2018-07-11 19:15:16 +03:00
committed by Eugenio Romano
parent 50b6fb978b
commit ee8151d50d
2 changed files with 44 additions and 4 deletions

View File

@@ -298,10 +298,15 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
);
} else if (this.sharedLinkId) {
this.apiService.sharedLinksApi.getSharedLink(this.sharedLinkId).then(details => {
this.setUpSharedLinkFile(details);
this.isLoading = false;
});
this.apiService.sharedLinksApi.getSharedLink(this.sharedLinkId).then(
details => {
this.setUpSharedLinkFile(details);
this.isLoading = false;
},
() => {
this.isLoading = false;
this.logService.error('This sharedLink does not exist');
});
}
}
}