mirror of https://github.com/gorhill/uBlock.git
Fix improper handling of srcset in element picker
Regression from:
- 16727d68c8
The issue was causing the element picker to being
unable to select elements with no valid `srcset`
property.
Test case -- trying to select one of the embedded
frames in the following page would fail:
- http://raymondhill.net/ublock/tiles1.html
This commit is contained in:
parent
9183e42a40
commit
d5dcf4e9b6
|
@ -267,7 +267,7 @@ const resourceURLsFromElement = function(elem) {
|
|||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1071
|
||||
const resourceURLsFromSrcset = function(elem, out) {
|
||||
let srcset = elem.srcset;
|
||||
if ( typeof srcset !== 'string' && srcset === '' ) { return; }
|
||||
if ( typeof srcset !== 'string' || srcset === '' ) { return; }
|
||||
for(;;) {
|
||||
// trim whitespace
|
||||
srcset = srcset.trim();
|
||||
|
|
Loading…
Reference in New Issue