Skip to content

Commit 78e54c2

Browse files
Handle null nextDescription in describeElement
Co-authored-by: Lucas Halfpenny <[email protected]>
1 parent c467d3f commit 78e54c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/domUtility.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function treeToArray(elem) {
3434
var nextDescription;
3535
for (var height = 0; elem && height < MAX_HEIGHT; height++) {
3636
nextDescription = describeElement(elem);
37-
if (nextDescription.tagName === 'html') {
37+
if (!nextDescription || nextDescription.tagName === 'html') {
3838
break;
3939
}
4040
out.unshift(nextDescription);

0 commit comments

Comments
 (0)