Skip to content

Commit

Permalink
Flatten the conditionals structure to one level.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dumluregn committed Apr 16, 2019
1 parent 0e4870b commit 3192693
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
return false;
}
// Also it's not table selection when image is selected (#2235).
if ( ranges[ 0 ].getEnclosedNode() && ranges[ 0 ].getEnclosedNode().type == CKEDITOR.NODE_ELEMENT ) {
if ( ranges[ 0 ].getEnclosedNode().is( 'img' ) ) {
return false;
}
if ( ranges[ 0 ].getEnclosedNode() &&
ranges[ 0 ].getEnclosedNode().type == CKEDITOR.NODE_ELEMENT &&
ranges[ 0 ].getEnclosedNode().is( 'img' ) ) {
return false;
}

var node,
Expand Down

0 comments on commit 3192693

Please sign in to comment.