Skip to content

Commit

Permalink
fix for ckeditor#859
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Heerklotz committed Sep 1, 2017
1 parent da389f9 commit 56aa6a2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/link/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,14 @@
range,
i;

if ( !returnMultiple && selectedElement && selectedElement.is( 'a' ) ) {
return selectedElement;
if ( selectedElement && selectedElement.is( 'a' ) ) {

if ( returnMultiple ) {
links.push( selectedElement );
}
else {
return selectedElement;
}
}

for ( i = 0; i < ranges.length; i++ ) {
Expand Down

0 comments on commit 56aa6a2

Please sign in to comment.