Bug fixes

This commit is contained in:
Behind The Math
2018-03-20 18:42:39 -04:00
parent ee82d0e0c7
commit 494f1f35ac
4 changed files with 14 additions and 14 deletions

View File

@@ -31,7 +31,7 @@ module.exports = function(el) {
// execute
parent.appendChild(script)
// avoid pollution only in head or body tags
if (["head", "body"].indexOf(parent.tagName.toLowerCase()) > 0) {
if (parent instanceof HTMLHeadElement || parent instanceof HTMLBodyElement) {
parent.removeChild(script)
}