1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-28 21:57:12 +02:00

Code review of fix re "internal error"

Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/199
This commit is contained in:
Raymond Hill 2024-09-22 12:14:52 -04:00
parent 687475ebf2
commit ff57f01026
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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();
});
});
}
});