diff --git a/app/src/protyle/render/av/layout.ts b/app/src/protyle/render/av/layout.ts index 658f74af7..515b92ad1 100644 --- a/app/src/protyle/render/av/layout.ts +++ b/app/src/protyle/render/av/layout.ts @@ -218,7 +218,7 @@ export const bindLayoutEvent = (options: { return; } const toggleBgElement = options.menuElement.querySelector('.b3-switch[data-type="toggle-kanban-bg"]') as HTMLInputElement; - toggleBgElement.addEventListener("change", () => { + toggleBgElement?.addEventListener("change", () => { const checked = toggleBgElement.checked; transaction(options.protyle, [{ action: "setAttrViewFillColBackgroundColor",