mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
handle "undefined" in list of frames when extracting outlinks (fixes ARI-4988)
This commit is contained in:
parent
0bd687abde
commit
772bcf0df6
@ -290,7 +290,9 @@ var compileOutlinks = function(frame) {
|
||||
var outlinks = Array.prototype.slice.call(
|
||||
frame.document.querySelectorAll('a[href]'));
|
||||
for (var i = 0; i < frame.frames.length; i++) {
|
||||
outlinks = outlinks.concat(compileOutlinks(frame.frames[i]));
|
||||
if (frame.frames[i]) { // sometimes undefined (why?)
|
||||
outlinks = outlinks.concat(compileOutlinks(frame.frames[i]));
|
||||
}
|
||||
}
|
||||
return outlinks;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user