Vanessa 2023-10-14 10:56:21 +08:00
parent 6b1a2925c9
commit 9ae8400b47
2 changed files with 2 additions and 2 deletions

View file

@ -252,7 +252,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
} else if (operation.action === "setAttrViewName") {
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.id}"]`)).forEach((item: HTMLElement) => {
const titleElement = item.querySelector(".av__title") as HTMLElement;
if (!titleElement || titleElement.textContent.trim() === operation.data) {
if (!titleElement) {
return;
}
titleElement.textContent = operation.data;