From d61ee623f92af66b24ae91c30ae8aa67cfa5e02a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 13 Dec 2023 11:49:17 +0800 Subject: [PATCH] :rotating_light: --- app/src/protyle/wysiwyg/list.ts | 2 +- app/src/protyle/wysiwyg/remove.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } } } -} +};