Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit d5f66be

Browse files
author
mikesamuel@gmail.com
committed
logging for IE
1 parent b5757d9 commit d5f66be

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

js-modules/numberLines.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ console.log('split "' + text.replace(/\r\n?|\n/g, '\\n') + '" into "' + firstLin
109109
var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
110110

111111
// Walk the parent chain until we reach an unattached LI.
112-
for (var parent; (parent = copiedListItem.parentNode);) { copiedListItem = parent; }
112+
for (var parent; (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
113+
copiedListItem = parent;
114+
}
113115
// Put it on the list of lines for later processing.
114116
listItems.push(copiedListItem);
115117
console.log('pushing listItem length=' + listItems.length + ', copy=' + copiedListItem.nodeName);

0 commit comments

Comments
 (0)