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") || "");