Skip to content

Commit

Permalink
shouldn't rely on the head always existing
Browse files Browse the repository at this point in the history
  • Loading branch information
Swizec authored and tmpvar committed Oct 11, 2010
1 parent 75903f2 commit a8ab41a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsdom/browser/index.js
Expand Up @@ -414,7 +414,7 @@ var browserAugmentation = exports.browserAugmentation = function(dom, options) {
dom.Document.prototype.__defineGetter__("styleSheets", function () {
var styles = new Array(),
nodes1 = this.getElementsByTagName("style"),
nodes2 = this.head.getElementsByTagName("link"),
nodes2 = (this.head) ? this.head.getElementsByTagName("link") : [],
node;

function StyleSheet(node) {
Expand Down

0 comments on commit a8ab41a

Please sign in to comment.