Fix regression in prevent-fetch scriptlet

Related feedback:
https://github.com/uBlockOrigin/uAssets/pull/15692#issuecomment-3558272468
This commit is contained in:
Raymond Hill 2025-11-20 09:32:54 -05:00
parent 42c94d97f9
commit 9d76b9991f
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -108,7 +108,7 @@ function preventFetchFn(
return context.reflect();
}
const matched = matchObjectPropertiesFn(propNeedles, details);
if ( matched === undefined ) {
if ( matched === undefined || matched.length === 0 ) {
return context.reflect();
}
return Promise.resolve(generateContentFn(trusted, responseBody)).then(text => {