From b4da65ac92920e6674f75153724bd767049f2da5 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 11 Feb 2023 22:58:58 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7339 --- app/src/index.ts | 2 +- app/src/menus/protyle.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/index.ts b/app/src/index.ts index 4964068ef..240d48a70 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -130,7 +130,7 @@ class App { fetchPost("/api/system/getConf", {}, response => { window.siyuan.config = response.data.conf; // 历史数据兼容,202306后可删除 - if (!window.siyuan.config.uiLayout.left.data) { + if (window.siyuan.config.uiLayout.left && !window.siyuan.config.uiLayout.left.data) { window.siyuan.config.uiLayout.left = { pin: true, data: response.data.conf.uiLayout.left diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 5a924565d..3f49966e8 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -698,7 +698,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText const html = nodeElement.outerHTML; const linkAddress = linkElement.getAttribute("data-href"); window.siyuan.menus.menu.append(new MenuItem({ - label: `
`, + label: `
`, bind(element) { const inputElement = element.querySelector("textarea"); inputElement.value = linkAddress || ""; @@ -718,7 +718,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText } }).element); window.siyuan.menus.menu.append(new MenuItem({ - label: `
`, + label: `
`, bind(element) { const inputElement = element.querySelector("textarea"); // https://github.com/siyuan-note/siyuan/issues/6798 @@ -760,7 +760,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText } }).element); window.siyuan.menus.menu.append(new MenuItem({ - label: `
`, + label: `
`, bind(element) { const inputElement = element.querySelector("textarea"); inputElement.value = Lute.UnEscapeHTMLStr(linkElement.getAttribute("data-title") || "");