Catch exception in clearDbLogs()

This commit is contained in:
redphx 2024-01-07 17:05:54 +07:00
parent 75d4e6f65c
commit 32422e5a62

View File

@ -8428,12 +8428,14 @@ function clearDbLogs(dbName, table) {
request.onsuccess = e => {
const db = e.target.result;
const objectStore = db.transaction(table, 'readwrite').objectStore(table);
const objectStoreRequest = objectStore.clear();
try {
const objectStore = db.transaction(table, 'readwrite').objectStore(table);
const objectStoreRequest = objectStore.clear();
objectStoreRequest.onsuccess = function(event) {
console.log(`[Better xCloud] Cleared ${dbName}.${table}`);
};
objectStoreRequest.onsuccess = function(event) {
console.log(`[Better xCloud] Cleared ${dbName}.${table}`);
};
} catch (e) {}
}
}