mirror of https://github.com/gorhill/uBlock.git
Fix race condition when loading redirect/scriptlet resources
Related feedback: https://github.com/uBlockOrigin/uAssets/issues/23806#issuecomment-2190491767
This commit is contained in:
parent
6b349ca0ef
commit
896737d098
|
@ -1008,12 +1008,12 @@ onBroadcast(msg => {
|
|||
ubolog('loadFilterLists() Start');
|
||||
t0 = Date.now();
|
||||
loadedListKeys.length = 0;
|
||||
loadingPromise = Promise.all([
|
||||
this.getAvailableLists().then(lists => onFilterListsReady(lists)),
|
||||
this.loadRedirectResources().then(( ) => {
|
||||
loadingPromise = this.loadRedirectResources().then(( ) => {
|
||||
ubolog(`loadFilterLists() Redirects/scriptlets ready at ${elapsed()}`);
|
||||
}),
|
||||
]).then(( ) => {
|
||||
return this.getAvailableLists();
|
||||
}).then(lists => {
|
||||
return onFilterListsReady(lists)
|
||||
}).then(( ) => {
|
||||
onDone();
|
||||
});
|
||||
return loadingPromise;
|
||||
|
|
Loading…
Reference in New Issue