From 915170aa700ed3efc9e0b9bc058b868a39875fac Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 30 Jul 2023 12:40:32 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/8849 --- app/src/protyle/header/Title.ts | 2 +- app/src/protyle/util/onGet.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts index c228b9802..3931f7686 100644 --- a/app/src/protyle/header/Title.ts +++ b/app/src/protyle/header/Title.ts @@ -299,7 +299,7 @@ export class Title { if (response.data.ial["custom-riff-decks"]) { this.element.setAttribute("custom-riff-decks", response.data.ial["custom-riff-decks"]); } - protyle.background.render(response.data.ial, protyle.block.rootID); + protyle.background?.render(response.data.ial, protyle.block.rootID); protyle.wysiwyg.renderCustom(response.data.ial); this.editElement.setAttribute("data-render", "true"); this.setTitle(response.data.ial.title); diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index 4bfa46559..ec969d83e 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -228,7 +228,9 @@ const setHTML = (options: { if (options.isSyncing) { disabledForeverProtyle(protyle); } else { - protyle.breadcrumb.element.nextElementSibling.textContent = ""; + if (protyle.breadcrumb) { + protyle.breadcrumb.element.nextElementSibling.textContent = ""; + } protyle.element.removeAttribute("disabled-forever"); if (window.siyuan.config.readonly || window.siyuan.config.editor.readOnly) { disabledProtyle(protyle);