1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

fix uBO misbehaving when corrupted SQL file is corrupted (1st step of the complete fix)

This commit is contained in:
gorhill 2016-06-29 12:07:25 -04:00
parent a5f7cbf969
commit 2973726da8

View File

@ -418,7 +418,7 @@ vAPI.storage = (function() {
console.error('SQLite error ', error.result, error.message); console.error('SQLite error ', error.result, error.message);
// Caller expects an answer regardless of failure. // Caller expects an answer regardless of failure.
if ( typeof callback === 'function' ) { if ( typeof callback === 'function' ) {
callback(null); callback({});
} }
result = null; result = null;
} }
@ -468,7 +468,7 @@ vAPI.storage = (function() {
} }
runStatement(stmt, function(result) { runStatement(stmt, function(result) {
callback(result.size); callback(result.size || 0);
}); });
}; };