diff --git a/src/html-parser.js b/src/html-parser.js index 80a32e3..6342c33 100644 --- a/src/html-parser.js +++ b/src/html-parser.js @@ -16,7 +16,7 @@ function canParseHTMLNatively () { // Firefox/Opera/IE throw errors on unsupported types try { // WebKit returns null on unsupported types - if (new Parser().parseFromString('', 'text/html')) { + if (Parser && new Parser().parseFromString('', 'text/html')) { canParse = true } } catch (e) {}