diff --git a/src/js/contentscript.js b/src/js/contentscript.js index fb5e1932e..3ce10096f 100644 --- a/src/js/contentscript.js +++ b/src/js/contentscript.js @@ -362,7 +362,7 @@ vAPI.SafeAnimationFrame = class { }; // https://github.com/chrisaljoudi/uBlock/issues/205 - // Do not handle added node directly from within mutation observer. + // Do not handle added node directly from within mutation observer. const observerHandler = function(mutations) { let i = mutations.length; while ( i-- ) { @@ -376,7 +376,7 @@ vAPI.SafeAnimationFrame = class { removedNodeLists.push(nodeList); } } - if ( addedNodeLists.length !== 0 || removedNodes ) { + if ( addedNodeLists.length !== 0 || removedNodeLists.length !== 0 ) { safeObserverHandlerTimer.start( addedNodeLists.length < 100 ? 1 : undefined );