浏览代码

:bug: https://github.com/siyuan-note/siyuan/issues/13314

Vanessa 7 月之前
父节点
当前提交
4d6b7b15d4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/boot/globalEvent/command/panel.ts

+ 1 - 1
app/src/boot/globalEvent/command/panel.ts

@@ -160,7 +160,7 @@ const filterList = (inputElement: HTMLInputElement, listElement: Element) => {
         const elementValue = element.querySelector(".b3-list-item__text").textContent.toLowerCase();
         const command = element.dataset.command;
         if (inputValue.indexOf(elementValue) > -1 || elementValue.indexOf(inputValue) > -1 ||
-            inputValue.indexOf(command) > -1 || command.indexOf(inputValue) > -1) {
+            inputValue.indexOf(command) > -1 || command?.indexOf(inputValue) > -1) {
             if (!hasFocus) {
                 element.classList.add("b3-list-item--focus");
             }