diff --git a/js/element-picker.js b/js/element-picker.js index f0ac469a8..053963458 100644 --- a/js/element-picker.js +++ b/js/element-picker.js @@ -424,8 +424,10 @@ var cosmeticFilterFromElement = function(elem, out) { v = elem.getAttribute('href'); if ( v ) { v = v.replace(/\?.*$/, ''); + if ( v.length ) { + attributes.push({ k: 'href', v: v }); + } } - attributes.push({ k: 'href', v: v }); break; case 'img': v = elem.getAttribute('alt');