fix: 未打开文档时点击大纲会弹出 未找到 ID 为 [] 的内容块 (#14026)

fix https://ld246.com/article/1738820297928
This commit is contained in:
Jeffrey Chen 2025-02-07 10:42:29 +08:00 committed by GitHub
parent 56cbedcbaf
commit 2088200677
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,7 +178,7 @@ export class Outline extends Model {
break; break;
} }
break; break;
} else if (target.isSameNode(this.headerElement.nextElementSibling) || target.classList.contains("block__icons")) { } else if (this.blockId && (target.isSameNode(this.headerElement.nextElementSibling) || target.classList.contains("block__icons"))) {
openFileById({ openFileById({
app: options.app, app: options.app,
id: this.blockId, id: this.blockId,