未验证 提交 3c94f711 编写于 作者: H Hugo Alliaume 提交者: GitHub

fix($core): check if meta is from head before removing it (#2403)

上级 e790ad3b
......@@ -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 => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册