diff --git a/apps/common/main/lib/controller/ExternalDiagramEditor.js b/apps/common/main/lib/controller/ExternalDiagramEditor.js index 62810e19e..8d8baf2ca 100644 --- a/apps/common/main/lib/controller/ExternalDiagramEditor.js +++ b/apps/common/main/lib/controller/ExternalDiagramEditor.js @@ -94,7 +94,7 @@ define([ 'Common.Views.ExternalDiagramEditor': { 'setchartdata': _.bind(this.setChartData, this), 'drag': _.bind(function(o, state){ - externalEditor.serviceCommand('window:drag', state == 'start'); + externalEditor && externalEditor.serviceCommand('window:drag', state == 'start'); },this), 'show': _.bind(function(cmp){ var h = this.diagramEditorView.getHeight(), @@ -138,7 +138,7 @@ define([ }, handler: function(result, value) { - externalEditor.serviceCommand('queryClose',{mr:result}); + externalEditor && externalEditor.serviceCommand('queryClose',{mr:result}); return true; }, diff --git a/apps/common/main/lib/controller/ExternalMergeEditor.js b/apps/common/main/lib/controller/ExternalMergeEditor.js index 9180da098..1f523444b 100644 --- a/apps/common/main/lib/controller/ExternalMergeEditor.js +++ b/apps/common/main/lib/controller/ExternalMergeEditor.js @@ -94,7 +94,7 @@ define([ 'Common.Views.ExternalMergeEditor': { 'setmergedata': _.bind(this.setMergeData, this), 'drag': _.bind(function(o, state){ - externalEditor.serviceCommand('window:drag', state == 'start'); + externalEditor && externalEditor.serviceCommand('window:drag', state == 'start'); },this), 'show': _.bind(function(cmp){ var h = this.mergeEditorView.getHeight(), @@ -138,7 +138,7 @@ define([ }, handler: function(result, value) { - externalEditor.serviceCommand('queryClose',{mr:result}); + externalEditor && externalEditor.serviceCommand('queryClose',{mr:result}); return true; },