1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Fix DOM watcher not reporting removal of elements

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1392

Regression from:
- 6112a68faf
This commit is contained in:
Raymond Hill 2020-12-10 12:51:26 -05:00
parent 2f841259ae
commit cb71fb494c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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
);