mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Fix regression in importation of custom lists
Reported by:
- https://github.com/uBlock-user:
Imported custom list were incorrectly seen as out of
date immediately after import operation.
Regression from:
- e27328f931
A few lines of code were improperly removed during
refactoring.
This commit is contained in:
parent
0051f3b5c7
commit
26235d80d0
@ -695,6 +695,12 @@ api.get = async function(assetKey, options = {}) {
|
||||
? await api.fetchFilterList(contentURL)
|
||||
: await api.fetchText(contentURL);
|
||||
if ( details.content === '' ) { continue; }
|
||||
if ( reIsExternalPath.test(contentURL) && options.dontCache !== true ) {
|
||||
assetCacheWrite(assetKey, {
|
||||
content: details.content,
|
||||
url: contentURL,
|
||||
});
|
||||
}
|
||||
return reportBack(details.content, contentURL);
|
||||
}
|
||||
return reportBack('', '', 'ENOTFOUND');
|
||||
|
@ -268,9 +268,9 @@
|
||||
}
|
||||
const newSet = new Set(newKeys);
|
||||
// Purge unused filter lists from cache.
|
||||
for ( let i = 0, n = oldKeys.length; i < n; i++ ) {
|
||||
if ( newSet.has(oldKeys[i]) === false ) {
|
||||
this.removeFilterList(oldKeys[i]);
|
||||
for ( const oldKey of oldKeys ) {
|
||||
if ( newSet.has(oldKey) === false ) {
|
||||
this.removeFilterList(oldKey);
|
||||
}
|
||||
}
|
||||
newKeys = Array.from(newSet);
|
||||
|
Loading…
Reference in New Issue
Block a user