From dd70e144a6fc4f500ab99aae529a8a6331d1af80 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 7 Nov 2023 20:28:11 +0300 Subject: [PATCH] Fix File menu --- apps/documenteditor/main/app/view/FileMenu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index d95aab4681..23347bd1de 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -474,12 +474,12 @@ define([ } if (this.mode.canDownload) { - !this.panels['saveas'] && (this.panels['saveas'] = ((new DE.Views.FileMenuPanels.ViewSaveAs({menu: this, fileType: this.document.fileType, mode: this.mode})).render())); + !this.panels['saveas'] && (this.panels['saveas'] = ((new DE.Views.FileMenuPanels.ViewSaveAs({menu: this, fileType: this.document ? this.document.fileType : undefined, mode: this.mode})).render())); } else if (this.mode.canDownloadOrigin) $('a',this.miDownload.$el).text(this.textDownload); if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) { - !this.panels['save-copy'] && (this.panels['save-copy'] = ((new DE.Views.FileMenuPanels.ViewSaveCopy({menu: this, fileType: this.document.fileType, mode: this.mode})).render())); + !this.panels['save-copy'] && (this.panels['save-copy'] = ((new DE.Views.FileMenuPanels.ViewSaveCopy({menu: this, fileType: this.document ? this.document.fileType : undefined, mode: this.mode})).render())); } if (this.mode.canHelp && !this.panels['help']) {