Skip to content

Commit

Permalink
fix: avoid to throw error when link doesn't have parentNode
Browse files Browse the repository at this point in the history
  • Loading branch information
VieZhong committed Feb 14, 2023
1 parent 5ffd858 commit 08032b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -862,7 +862,7 @@ class MiniCssExtractPlugin {
'err.code = "CSS_CHUNK_LOAD_FAILED";',
"err.type = errorType;",
"err.request = realHref;",
"linkTag.parentNode.removeChild(linkTag)",
"if(linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)",
"reject(err);",
]),
"}",
Expand Down

0 comments on commit 08032b1

Please sign in to comment.