diff --git a/lib/core/i18n/en.json b/lib/core/i18n/en.json
index 91833526ce..8ef8e7a3ca 100644
--- a/lib/core/i18n/en.json
+++ b/lib/core/i18n/en.json
@@ -298,7 +298,7 @@
"OF": "of"
},
"LOADING": "Loading",
- "UNKNOWN_FORMAT": "Couldn't load preview",
+ "UNKNOWN_FORMAT": "Couldn't load preview. Unknown format.",
"SIDEBAR": {
"THUMBNAILS": {
"PAGE": "Page {{ pageNum }}"
diff --git a/lib/core/viewer/components/unknown-format/unknown-format.component.html b/lib/core/viewer/components/unknown-format/unknown-format.component.html
index 7488627192..2e09cb1bf8 100644
--- a/lib/core/viewer/components/unknown-format/unknown-format.component.html
+++ b/lib/core/viewer/components/unknown-format/unknown-format.component.html
@@ -1,6 +1,6 @@
diff --git a/lib/core/viewer/components/viewer.component.ts b/lib/core/viewer/components/viewer.component.ts
index 573f798d88..fbd9163775 100644
--- a/lib/core/viewer/components/viewer.component.ts
+++ b/lib/core/viewer/components/viewer.component.ts
@@ -200,6 +200,8 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
@Output()
invalidSharedLink = new EventEmitter();
+ TRY_TIMEOUT: number = 2000;
+
viewerType = 'unknown';
isLoading = false;
nodeEntry: NodeEntry;
@@ -692,8 +694,12 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
this.viewerType = 'error_in_creation';
return reject();
});
+ } else {
+ this.isLoading = false;
+ this.viewerType = 'error_in_creation';
+ clearInterval(intervalId);
}
- }, 1000);
+ }, this.TRY_TIMEOUT);
});
}