Skip to content

Commit

Permalink
Stop resize command when there is no selected component
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Oct 18, 2017
1 parent b4752b4 commit 10b7a43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/commands/view/SelectComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ module.exports = {
* @private
* */
onSelect() {
const editor = this.editor;
const model = this.em.getSelected();

if (model) {
Expand All @@ -303,6 +304,8 @@ module.exports = {
this.hideElementOffset();
this.hideHighlighter();
this.initResize(el);
} else {
editor.stopCommand('resize');
}
},

Expand Down

0 comments on commit 10b7a43

Please sign in to comment.