diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index de7f53b368..8086bdb493 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -859,8 +859,7 @@ define([ this.documentCaption = value; var idx = this.documentCaption.lastIndexOf('.'); - if (idx>0) - this.fileExtention = this.documentCaption.substring(idx); + this.fileExtention = idx>0 ? this.documentCaption.substring(idx) : ''; this.isModified && (value += '*'); this.readOnly && (value += ' (' + this.textReadOnly + ')'); if ( $labelDocName ) {