Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit e904e96

Browse files
committed
this fixes #436
1 parent 2c7d75c commit e904e96

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/js/ublock.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,19 @@ var matchWhitelistDirective = function(url, hostname, directive) {
108108
var targetHostname = this.URI.hostnameFromURI(targetURL);
109109
var key = targetHostname;
110110
var directive = scope === 'page' ? targetURL : targetHostname;
111-
var buckets;
112111

113112
// Add to directive list
114113
if ( newState === false ) {
115114
if ( netWhitelist.hasOwnProperty(key) === false ) {
116-
buckets = netWhitelist[key] = [];
115+
netWhitelist[key] = [];
117116
}
118-
buckets.push(directive);
117+
netWhitelist[key].push(directive);
119118
this.saveWhitelist();
120119
return true;
121120
}
122121

123122
// Remove from directive list whatever causes current URL to be whitelisted
124-
var i;
123+
var buckets, i;
125124
for (;;) {
126125
if ( netWhitelist.hasOwnProperty(key) ) {
127126
buckets = netWhitelist[key];

0 commit comments

Comments
 (0)