mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-04 08:37:11 +02:00
Properly handle potential exception from webext API
Related feedback: - https://github.com/uBlockOrigin/uAssets/discussions/16939#discussioncomment-5356808
This commit is contained in:
parent
6e87026d40
commit
2f42cf61ab
@ -1383,10 +1383,13 @@ vAPI.adminStorage = (( ) => {
|
||||
},
|
||||
};
|
||||
}
|
||||
const cacheManagedStorage = ( ) => {
|
||||
webext.storage.managed.get().then(store => {
|
||||
const cacheManagedStorage = async ( ) => {
|
||||
let store;
|
||||
try {
|
||||
store = await webext.storage.managed.get();
|
||||
} catch(ex) {
|
||||
}
|
||||
webext.storage.local.set({ cachedManagedStorage: store || {} });
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user