Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Koenig - Fixed error on Cmd+K with no selection
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinansfield committed May 22, 2018
1 parent 47d91aa commit af5ac2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/koenig-editor/addon/utils/markup-utils.js
@@ -1,6 +1,6 @@
export function getLinkMarkupFromRange(range) {
let {headMarker, tailMarker} = range;
if (headMarker === tailMarker || headMarker.next === tailMarker) {
if (headMarker && (headMarker === tailMarker || headMarker.next === tailMarker)) {
return tailMarker.markups.findBy('tagName', 'a');
}
}

0 comments on commit af5ac2a

Please sign in to comment.