1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00

code review: only built-in assets are candidates for removal when updating assets.json

This commit is contained in:
gorhill 2017-01-18 13:35:10 -05:00
parent 3b9fd49c50
commit ff64a8340c

View File

@ -352,9 +352,12 @@ var updateAssetSourceRegistry = function(json) {
getAssetSourceRegistry(function(oldDict) {
var assetKey;
// Remove obsolete entries
// Remove obsolete entries (only those which were built-in).
for ( assetKey in oldDict ) {
if ( newDict[assetKey] === undefined ) {
if (
newDict[assetKey] === undefined &&
oldDict[assetKey].submitter === undefined
) {
unregisterAssetSource(assetKey);
}
}