From 24ee5d14bebab8facc6bdf04f3ae3c47b5f3e10f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 31 Jan 2024 10:25:00 +0800 Subject: [PATCH] :art: --- app/src/util/highlightById.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.ts index 406c51d09..270cb87ea 100644 --- a/app/src/util/highlightById.ts +++ b/app/src/util/highlightById.ts @@ -44,7 +44,7 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal if (blockElement) { // undo 时禁止数据库滚动 if (blockElement.classList.contains("av") && blockElement.dataset.render === "true" && - (blockElement.querySelector(".av__row--header").getAttribute("style").indexOf("transform") > -1 || blockElement.querySelector(".av__row--footer").getAttribute("style").indexOf("transform") > -1)) { + (blockElement.querySelector(".av__row--header").getAttribute("style")?.indexOf("transform") > -1 || blockElement.querySelector(".av__row--footer").getAttribute("style")?.indexOf("transform") > -1)) { return; } const editorElement = protyle.contentElement;