1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

this fixes /gorhill/httpswitchboard/issues/381

This commit is contained in:
gorhill 2014-07-23 12:53:56 -04:00
parent 93d45137e4
commit 66ea8355f2
2 changed files with 12 additions and 7 deletions

View File

@ -79,13 +79,18 @@ var cachedAssetsManager = (function() {
return; return;
} }
var onLoaded = function(bin) { var onLoaded = function(bin) {
if ( chrome.runtime.lastError ) { // https://github.com/gorhill/httpswitchboard/issues/381
console.error( // Maybe the index was requested multiple times and already
'µBlock> cachedAssetsManager> getEntries():', // fetched by one of the occurrences.
chrome.runtime.lastError.message if ( entries === null ) {
); if ( chrome.runtime.lastError ) {
console.error(
'µBlock> cachedAssetsManager> getEntries():',
chrome.runtime.lastError.message
);
}
entries = bin.cached_asset_entries || {};
} }
entries = bin.cached_asset_entries || {};
callback(entries); callback(entries);
}; };
chrome.storage.local.get('cached_asset_entries', onLoaded); chrome.storage.local.get('cached_asset_entries', onLoaded);

View File

@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "__MSG_extName__", "name": "__MSG_extName__",
"short_name": "µBlock", "short_name": "µBlock",
"version": "0.2.3.4", "version": "0.2.3.5",
"description": "__MSG_extShortDesc__", "description": "__MSG_extShortDesc__",
"icons": { "icons": {
"16": "img/icon_16.png", "16": "img/icon_16.png",