Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Commit

Permalink
fix TypeError: jsdom.jsdom is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
Andela Developer authored and Andela Developer committed Feb 9, 2018
1 parent d0ee1bd commit 98aa717
Show file tree
Hide file tree
Showing 2 changed files with 1,924 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ module.exports = (function createParser () {
reduceTransformations[attrname] = externalReduceTransformations[attrname]
}

var document = jsdom.jsdom(html.toString())
var xhtml = xmlser.serializeToString(document)
var document = new jsdom.JSDOM(html.toString())
var xhtml = xmlser.serializeToString(document.window.document)
xhtml = xhtml.replace(' xmlns="http://www.w3.org/1999/xhtml"', '') // Ugly hack, for now
var doc = new dom().parseFromString(xhtml)
return parseNode(config, doc)
Expand Down
Loading

0 comments on commit 98aa717

Please sign in to comment.