mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-29 15:10:06 +00:00
Add parent checking before inserting or removing the child
This commit is contained in:
@@ -34,7 +34,7 @@ export function PWA(post, siteInfo) {
|
||||
|
||||
// 删除已有的 manifest link 元素(如果存在)
|
||||
const existingManifest = document.querySelector('link[rel="manifest"]')
|
||||
if (existingManifest) {
|
||||
if (existingManifest && existingManifest.parentNode && existingManifest.parentNode.contains(existingManifest)) {
|
||||
existingManifest.parentNode.removeChild(existingManifest)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user