mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Code review of fix re "internal error"
Related issue: https://github.com/uBlockOrigin/uBOL-home/issues/199
This commit is contained in:
parent
687475ebf2
commit
ff57f01026
@ -388,15 +388,14 @@ async function start() {
|
||||
|
||||
// https://github.com/uBlockOrigin/uBOL-home/issues/199
|
||||
// Force a restart of the extension once when an "internal error" occurs
|
||||
try {
|
||||
start();
|
||||
start().then(( ) => {
|
||||
localWrite({ goodStart: true });
|
||||
} catch(reason) {
|
||||
}).catch(reason => {
|
||||
console.trace(reason);
|
||||
localRead.get('goodStart').then((bin = {}) => {
|
||||
if ( bin.goodStart !== true ) { return; }
|
||||
localRead('goodStart').then((bin = {}) => {
|
||||
if ( bin.goodStart === false ) { return; }
|
||||
localWrite({ goodStart: false }).then(( ) => {
|
||||
runtime.reload();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user