Skip to content

Commit 4f2c4a6

Browse files
authored
Handle null nextDescription in describeElement
1 parent c467d3f commit 4f2c4a6

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)