From 5ec9d9dc36b9904f80146f24e74a974268813e62 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 12 Apr 2023 14:46:17 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7943 --- app/src/card/openCard.ts | 12 +++++++++--- app/src/card/viewCards.ts | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts index 075a58343..1fdc7ea8f 100644 --- a/app/src/card/openCard.ts +++ b/app/src/card/openCard.ts @@ -107,7 +107,9 @@ export const openCardByData = (cardsData: { cards: ICard[], unreviewedCount: num destroyCallback() { if (editor) { editor.destroy(); - window.siyuan.mobile.popEditor = null; + if (window.siyuan.mobile) { + window.siyuan.mobile.popEditor = null; + } } } }); @@ -124,7 +126,9 @@ export const openCardByData = (cardsData: { cards: ICard[], unreviewedCount: num }, typewriterMode: false }); - window.siyuan.mobile.popEditor = editor; + if (window.siyuan.mobile) { + window.siyuan.mobile.popEditor = editor; + } if (window.siyuan.config.editor.readOnly) { disabledProtyle(editor.protyle); } @@ -365,7 +369,9 @@ const newRound = (countElement: Element, editor: Protyle, actionElements: NodeLi countElement.classList.add("fn__none"); editor.protyle.element.classList.add("fn__none"); const emptyElement = editor.protyle.element.nextElementSibling; - emptyElement.innerHTML = `
♻️ ${window.siyuan.languages.continueReview2.replace("${count}", unreviewedCount)}
+ emptyElement.innerHTML = `
♻️
+${window.siyuan.languages.continueReview2.replace("${count}", unreviewedCount)} +
`; emptyElement.classList.remove("fn__none"); actionElements[0].classList.add("fn__none"); diff --git a/app/src/card/viewCards.ts b/app/src/card/viewCards.ts index b30b5e6b3..97778817b 100644 --- a/app/src/card/viewCards.ts +++ b/app/src/card/viewCards.ts @@ -48,7 +48,9 @@ export const viewCards = (deckID: string, title: string, deckType: "Tree" | "" | destroyCallback() { if (edit) { edit.destroy(); - window.siyuan.mobile.popEditor = null; + if (window.siyuan.mobile) { + window.siyuan.mobile.popEditor = null; + } } } }); @@ -62,7 +64,9 @@ export const viewCards = (deckID: string, title: string, deckType: "Tree" | "" | breadcrumbDocName: true }, }); - window.siyuan.mobile.popEditor = edit; + if (window.siyuan.mobile) { + window.siyuan.mobile.popEditor = edit; + } if (window.siyuan.config.editor.readOnly) { disabledProtyle(edit.protyle); }