瀏覽代碼

fix shadow dom deserialization

Gildas 5 年之前
父節點
當前提交
8a2fc13f57
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      extension/ui/content/content-ui-editor-web.js

+ 4 - 2
extension/ui/content/content-ui-editor-web.js

@@ -1843,8 +1843,10 @@ table {
 							shadowRoot.innerHTML = element.innerHTML;
 							element.remove();
 						} catch (error) {}						
-						processNode(shadowRoot);
-					}
+						if (shadowRoot) {
+							processNode(shadowRoot);
+						}
+					}					
 				})
 			};
 			const FORBIDDEN_TAG_NAMES = ${JSON.stringify(FORBIDDEN_TAG_NAMES)};