diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index 37a3c03ca..6692a6510 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -286,7 +286,7 @@ export const breakList = (protyle: IProtyle, blockElement: Element, range: Range * @param isDelete * @param deleteElement 末尾反向删除时才会传入 */ -export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range: Range, isDelete = false, deleteElement:Element) => { +export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range: Range, isDelete = false, deleteElement?: Element) => { const liElement = liItemElements[0].parentElement; const liId = liElement.getAttribute("data-node-id"); if (!liId) { diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts index 770a05914..a71595a6b 100644 --- a/app/src/protyle/wysiwyg/remove.ts +++ b/app/src/protyle/wysiwyg/remove.ts @@ -515,12 +515,12 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran export const moveToPrevious = (blockElement: Element, range: Range, isDelete: boolean) => { if (isDelete) { - const previousBlockElement = getPreviousBlock(blockElement) + const previousBlockElement = getPreviousBlock(blockElement); if (previousBlockElement) { - const previousEditElement = getContenteditableElement(getLastBlock(previousBlockElement)) + const previousEditElement = getContenteditableElement(getLastBlock(previousBlockElement)); if (previousEditElement) { setLastNodeRange(previousEditElement, range, false); } } } -} +};