From 722a91014508d9a8d65a30ab7d71b23924fa9b91 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Fri, 7 Apr 2023 21:09:37 +0800 Subject: [PATCH] fix: lose line break when set title --- src/editor/core/command/CommandAdapt.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/editor/core/command/CommandAdapt.ts b/src/editor/core/command/CommandAdapt.ts index 33c4fa2..a66d7de 100644 --- a/src/editor/core/command/CommandAdapt.ts +++ b/src/editor/core/command/CommandAdapt.ts @@ -409,6 +409,7 @@ export class CommandAdapt { const titleId = getUUID() const titleOptions = this.draw.getOptions().title changeElementList.forEach(el => { + if (!el.type && el.value === ZERO) return if (payload) { el.level = payload el.titleId = titleId