This repository was archived by the owner on Nov 15, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,18 @@ var cachedAssetsManager = (function() {
7878 return ;
7979 }
8080 var onLoaded = function ( bin ) {
81- if ( chrome . runtime . lastError ) {
82- console . error (
83- 'HTTP Switchboard> cachedAssetsManager> getEntries():' ,
84- chrome . runtime . lastError . message
85- ) ;
81+ // https://github.com/gorhill/httpswitchboard/issues/381
82+ // Maybe the index was requested multiple times and already
83+ // fetched by one of the occurrences.
84+ if ( entries === null ) {
85+ if ( chrome . runtime . lastError ) {
86+ console . error (
87+ 'HTTP Switchboard> cachedAssetsManager> getEntries():' ,
88+ chrome . runtime . lastError . message
89+ ) ;
90+ }
91+ entries = bin . cached_asset_entries || { } ;
8692 }
87- entries = bin . cached_asset_entries || { } ;
8893 callback ( entries ) ;
8994 } ;
9095 chrome . storage . local . get ( 'cached_asset_entries' , onLoaded ) ;
Original file line number Diff line number Diff line change 22 "manifest_version" : 2 ,
33 "name" : " __MSG_extName__" ,
44 "short_name" : " HTTPSB" ,
5- "version" : " 1.0.0.3 " ,
5+ "version" : " 1.0.0.4 " ,
66 "description" : " __MSG_extShortDesc__" ,
77 "icons" : {
88 "16" : " icon_16.png" ,
You can’t perform that action at this time.
0 commit comments