Skip to content

Commit 89e3f03

Browse files
author
viezhong
committed
fix: avoid to throw error when link doesn't have parentNode
1 parent 5ffd858 commit 89e3f03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ class MiniCssExtractPlugin {
862862
'err.code = "CSS_CHUNK_LOAD_FAILED";',
863863
"err.type = errorType;",
864864
"err.request = realHref;",
865-
"linkTag.parentNode.removeChild(linkTag)",
865+
"if(linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)",
866866
"reject(err);",
867867
]),
868868
"}",

0 commit comments

Comments
 (0)