diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts
index d3e44333087d13d2a078cbf0a24032f874606886..fda4553137220a9b123b4aaba039a990d084017a 100644
--- a/src/frontend/app/viewer/document-viewer.component.ts
+++ b/src/frontend/app/viewer/document-viewer.component.ts
@@ -660,7 +660,7 @@ export class DocumentViewerComponent implements OnInit {
             this.http.post('../../rest/jnlp', this.editor.options).pipe(
                 tap((data: any) => {
                     window.location.href = '../../rest/jnlp/' + data.generatedJnlp;
-                    this.checkLockFile(data.jnlpUniqueId, this.format);
+                    this.checkLockFile(data.jnlpUniqueId, this.file.format);
                 })
             ).subscribe();
         }
@@ -689,7 +689,7 @@ export class DocumentViewerComponent implements OnInit {
             this.http.post('../../rest/jnlp', this.editor.options).pipe(
                 tap((data: any) => {
                     window.location.href = '../../rest/jnlp/' + data.generatedJnlp;
-                    this.checkLockFile(data.jnlpUniqueId, this.format);
+                    this.checkLockFile(data.jnlpUniqueId, this.file.format);
                 })
             ).subscribe();
         }