Skip to content

Commit

Permalink
Fix issue #1312
Browse files Browse the repository at this point in the history
TypeError: Cannot read properties of null (reading 'previousElementSibling')
  • Loading branch information
JFox23 committed Nov 15, 2023
1 parent cda8beb commit feddc43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,9 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
let endNextEl = null;
if (isStartEdge) {
startPrevEl = util.getFormatElement(range.startContainer);
prevContainer = startPrevEl.previousElementSibling;
if (startPrevEl) {
prevContainer = startPrevEl.previousElementSibling;
}
startPrevEl = startPrevEl ? prevContainer : startPrevEl;
}
if (isEndEdge) {
Expand Down

0 comments on commit feddc43

Please sign in to comment.