mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-16 23:42:39 +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
|
// https://github.com/uBlockOrigin/uBOL-home/issues/199
|
||||||
// Force a restart of the extension once when an "internal error" occurs
|
// Force a restart of the extension once when an "internal error" occurs
|
||||||
try {
|
start().then(( ) => {
|
||||||
start();
|
|
||||||
localWrite({ goodStart: true });
|
localWrite({ goodStart: true });
|
||||||
} catch(reason) {
|
}).catch(reason => {
|
||||||
console.trace(reason);
|
console.trace(reason);
|
||||||
localRead.get('goodStart').then((bin = {}) => {
|
localRead('goodStart').then((bin = {}) => {
|
||||||
if ( bin.goodStart !== true ) { return; }
|
if ( bin.goodStart === false ) { return; }
|
||||||
localWrite({ goodStart: false }).then(( ) => {
|
localWrite({ goodStart: false }).then(( ) => {
|
||||||
runtime.reload();
|
runtime.reload();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user