From aecc43472df4182862469663c06995abbf5e0ab6 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Tue, 19 Apr 2022 12:54:31 +0300 Subject: [PATCH] [SSE] Fix print settings --- apps/spreadsheeteditor/main/app/controller/Print.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 98b361279..3f3336442 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -153,7 +153,7 @@ define([ panel.cmbSheet.store.findWhere({value: this.api.asc_getActiveWorksheetIndex()}); if (item) { panel.cmbSheet.setValue(item.get('value')); - panel.updateActiveSheet(item.get('displayValue')); + panel.updateActiveSheet && panel.updateActiveSheet(item.get('displayValue')); } }, @@ -733,7 +733,7 @@ define([ newPage = 0; this._currentPrintType = printType; } else if (this._navigationPreview.currentPage > pageCount - 1) { - newPage = pageCount - 1; + newPage = Math.max(0, pageCount - 1); } else { newPage = this._navigationPreview.currentPage; }