Skip to content

Commit

Permalink
Small rf
Browse files Browse the repository at this point in the history
  • Loading branch information
Valera committed Jul 6, 2019
1 parent 59af400 commit 870fb56
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/plugins/backspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export function backspace(editor: IJodit) {
box = parent as HTMLElement | null;
} while (box && box !== editor.editor);
};

const removeChar = (
box: { node: Node | null },
toLeft: boolean,
Expand Down Expand Up @@ -145,6 +146,7 @@ export function backspace(editor: IJodit) {
return false;
}
};

const removeInline = (
box: { node: Node | null },
toLeft: boolean,
Expand Down Expand Up @@ -260,9 +262,9 @@ export function backspace(editor: IJodit) {
return false;
}

const sel = editor.selection.sel,
range: Range | false =
sel && sel.rangeCount ? sel.getRangeAt(0) : false;
const
sel = editor.selection.sel,
range = sel && sel.rangeCount ? sel.getRangeAt(0) : false;

if (!range) {
return false;
Expand Down Expand Up @@ -315,8 +317,8 @@ export function backspace(editor: IJodit) {
);
}

if (tryRemoveInline !== void 0) {
return tryRemoveInline ? void 0 : false;
if (tryRemoveInline !== undefined) {
return tryRemoveInline ? undefined : false;
}

if (container && container.nodeName.match(/^(TD)$/)) {
Expand Down

0 comments on commit 870fb56

Please sign in to comment.