Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rotating_light:

Vanessafac82ad618a5
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 5a7b8021cc..73422b4300 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -766,7 +766,7 @@ export class Files extends Model {
return;
}
let currentPath = filePath;
- let liElement
+ let liElement;
while (!liElement) {
liElement = treeElement.querySelector(`[data-path="${currentPath}"]`);
if (!liElement) {
@@ -777,7 +777,7 @@ export class Files extends Model {
currentPath = dirname + ".sy";
}
} else {
- liElement.querySelector(".fn__hidden").classList.remove("fn__hidden");
+ liElement.querySelector(".fn__hidden")?.classList.remove("fn__hidden");
break;
}
}
diff --git a/app/src/menus/workspace.ts b/app/src/menus/workspace.ts
index b265beb6ec..6f39468224 100644
--- a/app/src/menus/workspace.ts
+++ b/app/src/menus/workspace.ts
@@ -549,7 +549,7 @@ const workspaceItem = (item: IWorkspace) => {
writeText(item.path);
showMessage(window.siyuan.languages.copied);
}
- }]
+ }];
if (item.path !== window.siyuan.config.system.workspaceDir) {
submenu.splice(0, 0, {
id: "openBy",
@@ -558,7 +558,7 @@ const workspaceItem = (item: IWorkspace) => {
click() {
openWorkspace(item.path);
}
- })
+ });
if (item.closed) {
submenu.push({
id: "removeWorkspaceTip",
diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts
index e3999992e7..b71f291dcd 100644
--- a/app/src/mobile/dock/MobileFiles.ts
+++ b/app/src/mobile/dock/MobileFiles.ts
@@ -279,7 +279,7 @@ export class MobileFiles extends Model {
return;
}
let currentPath = filePath;
- let liElement
+ let liElement;
while (!liElement) {
liElement = treeElement.querySelector(`[data-path="${currentPath}"]`);
if (!liElement) {
@@ -290,7 +290,7 @@ export class MobileFiles extends Model {
currentPath = dirname + ".sy";
}
} else {
- liElement.querySelector(".fn__hidden").classList.remove("fn__hidden");
+ liElement.querySelector(".fn__hidden")?.classList.remove("fn__hidden");
break;
}
}
diff --git a/app/src/protyle/wysiwyg/getBlock.ts b/app/src/protyle/wysiwyg/getBlock.ts
index d33ea8a9f4..d2c4facd3a 100644
--- a/app/src/protyle/wysiwyg/getBlock.ts
+++ b/app/src/protyle/wysiwyg/getBlock.ts
@@ -168,7 +168,7 @@ export const isEndOfBlock = (range: Range) => {
return false;
}
- let nextSibling = range.endContainer
+ let nextSibling = range.endContainer;
while (nextSibling) {
if (hasNextSibling(nextSibling)) {
return false;
@@ -176,12 +176,12 @@ export const isEndOfBlock = (range: Range) => {
if (nextSibling.parentElement.getAttribute("spellcheck")) {
return true;
}
- nextSibling = nextSibling.parentElement
+ nextSibling = nextSibling.parentElement;
}
}
return true;
-}
+};
export const hasPreviousSibling = (element: Node) => {
let previousSibling = element.previousSibling;
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 6071217916..0278a05fc5 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -342,7 +342,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
event.stopPropagation();
return;
}
- const nodeEditableElement = getContenteditableElement(nodeElement)
+ const nodeEditableElement = getContenteditableElement(nodeElement);
const position = getSelectionOffset(nodeEditableElement, protyle.wysiwyg.element, range);
if (position.start === 0 && event.key === "ArrowLeft") {
event.preventDefault();