Skip to content

Commit 8614ec5

Browse files
committed
fixed #58
1 parent a30a758 commit 8614ec5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Providers/Html.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ protected static function getMainElement(\DOMDocument $html)
309309
}
310310
}
311311

312-
// Returns <body>
313-
return $html->getElementsByTagName('body')->item(0);
312+
// Returns <body> or <html>
313+
return $html->getElementsByTagName('body')->item(0) ?: $html->getElementsByTagName('html')->item(0);
314314
}
315315
}

0 commit comments

Comments
 (0)