From 5f95f0facc8514f869422854e798f691cd92f878 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 16 Sep 2022 00:20:50 +0300 Subject: [PATCH] Fix document title on loading --- apps/common/main/lib/view/Header.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 2d39995ca..8b98284ac 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -791,12 +791,9 @@ define([ }, setDocTitle: function(name){ - if(name) - $labelDocName.val(name); - else - name = $labelDocName.val(); - var width = this.getTextWidth(name); + var width = this.getTextWidth(name || $labelDocName.val()); (width>=0) && $labelDocName.width(width); + name && (width>=0) && $labelDocName.val(name); if (this._showImgCrypted && width>=0) { this.imgCrypted.toggleClass('hidden', false); this._showImgCrypted = false;