code review: element picker

This commit is contained in:
gorhill 2015-03-21 23:54:09 -04:00
parent 58ebcd21c3
commit 4aec3404c4
1 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ var netFilterFromUnion = (function() {
var from = lastNetFilterUnion;
// Reset reference filter when dealing with unrelated URLs
if ( from === '' && a.host !== lastNetFilterHostname ) {
if ( from === '' || a.host !== lastNetFilterHostname ) {
lastNetFilterHostname = a.host;
lastNetFilterUnion = to;
localMessager.send({
@ -289,7 +289,7 @@ var netFilterFromUnion = (function() {
}
}
from = fromTokens.join('').replace(/\*\*+/g, '*');
if ( from !== '/*' ) {
if ( from !== '/*' && from !== to ) {
out.push('||' + lastNetFilterHostname + from);
} else {
from = to;