1
0
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:
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 // 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();
}); });
}); });
} });