Or just simplify by combining both conditions...

This commit is contained in:
Raymond Hill 2020-07-05 09:17:06 -04:00
parent 37f5b3d642
commit cd1a3d22cd
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 9 deletions

View File

@ -681,16 +681,11 @@ const filterToDOMInterface = (( ) => {
for ( const elem of elems ) {
const srcProp = netFilter1stSources[elem.localName];
const src = elem[srcProp];
if ( typeof src === 'string' && reFilter.test(src) ) {
out.push({
type: 'network',
elem: elem,
src: srcProp,
opts: filterTypes[elem.localName],
});
} else if (
if (
typeof src === 'string' &&
reFilter.test(src) ||
typeof elem.currentSrc === 'string' &&
reFilter.test(elem.currentSrc)
reFilter.test(elem.currentSrc)
) {
out.push({
type: 'network',