diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 444fc7d21f..da069099f3 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1247,11 +1247,7 @@ define([ this.api.zoomFitToWidth(); } } else { - if (zf > 0) { - this.api.zoom(zf); - } else { - this.api.zoom(100); - } + this.api.zoom(zf > 0 ? zf : 100); } value = Common.localStorage.getItem("de-show-hiddenchars"); diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index 5c75e7304b..16fb7222a0 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -956,11 +956,7 @@ define([ this.api.zoomFitToWidth(); } } else { - if (zf > 0) { - this.api.zoom(zf); - } else { - this.api.zoom(100); - } + this.api.zoom(zf > 0 ? zf : 100); } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 5fd7df29d4..933d790be5 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -867,11 +867,7 @@ define([ this.api.zoomFitToWidth(); } } else { - if (zf > 0) { - this.api.zoom(zf); - } else { - this.api.zoom(100); - } + this.api.zoom(zf > 0 ? zf : 100); }