diff --git a/ghost/admin/lib/koenig-editor/addon/utils/markup-utils.js b/ghost/admin/lib/koenig-editor/addon/utils/markup-utils.js index 191b603ad7..ddea3aaf62 100644 --- a/ghost/admin/lib/koenig-editor/addon/utils/markup-utils.js +++ b/ghost/admin/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'); } }