Skip to content

Commit 1db54c4

Browse files
committed
Fix the logging of all prevent-xhr calls
Related feedback: uBlockOrigin/uBlock-issues#3096 (comment)
1 parent 1e614a7 commit 1db54c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

assets/resources/scriptlets.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,11 +2525,12 @@ function noXhrIf(
25252525
return super.open(method, url, ...args);
25262526
}
25272527
const haystack = { method, url };
2528-
if ( matchObjectProperties(propNeedles, haystack) ) {
2529-
xhrInstances.set(this, haystack);
2530-
}
25312528
if ( propsToMatch === '' && directive === '' ) {
25322529
safe.uboLog(logPrefix, `Called: ${safe.JSON_stringify(haystack, null, 2)}`);
2530+
return super.open(method, url, ...args);
2531+
}
2532+
if ( matchObjectProperties(propNeedles, haystack) ) {
2533+
xhrInstances.set(this, haystack);
25332534
}
25342535
haystack.headers = Object.assign({}, headers);
25352536
return super.open(method, url, ...args);

0 commit comments

Comments
 (0)