filter check

This commit is contained in:
Jiiks 2018-03-09 11:00:15 +02:00
parent ae651e08e9
commit fe884ae436
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,8 @@ class DOMObserver {
for (let sub of this.subscriptions) {
try {
const f = sub.type && sub.type === 'filter' ? mutations.filter(sub.filter) : mutations.find(sub.filter);
if (!f || !f.length) continue;
if (!f) continue;
if (sub.type && sub.type === 'filter' && !f.length) continue;
sub.callback(f);
} catch(err) {}
}