@smartbit4all/ng-client 3.1.22 → 3.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2920,19 +2920,24 @@ class SmartViewContextService {
2920
2920
  link.remove();
2921
2921
  });
2922
2922
  this.viewContext?.downloads?.map(async (file) => {
2923
- let blob = await this.downloadResource(file.uuid, file.identifier);
2924
- let url = URL.createObjectURL(blob);
2925
- const link = document.createElement('a');
2926
- link.setAttribute('target', '_blank');
2927
- link.setAttribute('href', url);
2928
- link.setAttribute('download', file.filename);
2929
- document.body.appendChild(link);
2930
- link.click();
2931
- link.remove();
2923
+ try {
2924
+ let blob = await this.downloadResource(file.uuid, file.identifier);
2925
+ let url = URL.createObjectURL(blob);
2926
+ const link = document.createElement('a');
2927
+ link.setAttribute('target', '_blank');
2928
+ link.setAttribute('href', url);
2929
+ link.setAttribute('download', file.filename);
2930
+ document.body.appendChild(link);
2931
+ link.click();
2932
+ link.remove();
2933
+ }
2934
+ catch (e) {
2935
+ console.error('Error downloading file');
2936
+ console.error(e);
2937
+ }
2932
2938
  });
2933
2939
  this.viewContextHasBeenSynced.next();
2934
2940
  }
2935
- createLink(linkData) { }
2936
2941
  getUuidOfPage(pageName) {
2937
2942
  let uuid = sessionStorage.getItem(pageName);
2938
2943
  if (!uuid) {