Test for existence of monitors[i] before trying to kill it just to reduce javascript errors
parent
4b5db75d90
commit
3c38f5d3f9
|
@ -265,8 +265,8 @@ function initPage() {
|
|||
// If you click on the navigation links, shut down streaming so the browser can process it
|
||||
document.querySelectorAll('#main-header-nav a').forEach(function(el) {
|
||||
el.onclick = function() {
|
||||
for (var i = 0, length = monitors.length; i < length; i++) {
|
||||
monitors[i].kill();
|
||||
for (let i = 0, length = monitors.length; i < length; i++) {
|
||||
if (monitors[i]) monitors[i].kill();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue