diff --git a/apps/documenteditor/mobile/app/controller/edit/EditImage.js b/apps/documenteditor/mobile/app/controller/edit/EditImage.js index 956e45eb6..0c1f4c9be 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditImage.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditImage.js @@ -196,11 +196,12 @@ define([ if (me.api) { var imgsize = me.api.get_OriginalSizeImage(), properties = new Asc.asc_CImgProperty(); - - properties.put_Width(imgsize.get_ImageWidth()); - properties.put_Height(imgsize.get_ImageHeight()); - properties.put_ResetCrop(true); - me.api.ImgApply(properties); + if (imgsize) { + properties.put_Width(imgsize.get_ImageWidth()); + properties.put_Height(imgsize.get_ImageHeight()); + properties.put_ResetCrop(true); + me.api.ImgApply(properties); + } } }, diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index c7451ee85..a4e83bfd5 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1660,7 +1660,7 @@ define([ }, onDocumentMouseMove: function(e) { - if (e.target.localName !== 'canvas') { + if (e && e.target.localName !== 'canvas') { this.hideHyperlinkTip(); } }, diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index 9fa867b2b..c94da75d7 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -82,7 +82,7 @@ define([ focus: function() { var me = this; _.defer(function(){ - me.cmpEl.focus(); + me.cmpEl && me.cmpEl.focus(); }, 50); }, diff --git a/apps/spreadsheeteditor/main/app/view/PivotSettings.js b/apps/spreadsheeteditor/main/app/view/PivotSettings.js index 24a660a80..fabddb861 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotSettings.js +++ b/apps/spreadsheeteditor/main/app/view/PivotSettings.js @@ -415,8 +415,8 @@ define([ models[index].set({ pivotIndex: pivotIndex, index : index, - value : name, - tip : (name.length>10) ? name : '' + value : name || '', + tip : (name && name.length>10) ? name : '' }); } else arr.push(new Common.UI.DataViewModel({ @@ -424,8 +424,8 @@ define([ allowSelected : false, pivotIndex : pivotIndex, index : index, - value : name, - tip : (name.length>10) ? name : '' + value : name || '', + tip : (name && name.length>10) ? name : '' })); isChecked[getNameFunction ? name : me._state.names[pivotIndex]] = true; });