Failed to execute 'removeChild' on 'Node'

前端 未结 10 1291
一向
一向 2020-12-01 01:40

I\'m using http://alexgorbatchev.com/SyntaxHighlighter/ to highlight code on my website but sometimes in my log im getting Javascript errors like this :

10条回答
  •  星月不相逢
    2020-12-01 02:29

    I was getting this error and nothing from above helped me, eventually I ended up with just simple :

    if (img.parentNode) {
        body.removeChild(img);
    }
    

    which works perfectly for me.

提交回复
热议问题