Skip to content

Commit

Permalink
fix($core): check if meta is from head before removing it (#2403)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal authored Jun 14, 2020
1 parent e790ad3 commit 3c94f71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@vuepress/core/lib/client/root-mixins/updateMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export default {
*/
function updateMetaTags (newMetaTags, currentMetaTags) {
if (currentMetaTags) {
[...currentMetaTags].forEach(c => {
document.head.removeChild(c)
})
[...currentMetaTags]
.filter(c => c.parentNode === document.head)
.forEach(c => document.head.removeChild(c))
}
if (newMetaTags) {
return newMetaTags.map(m => {
Expand Down

0 comments on commit 3c94f71

Please sign in to comment.