Ensure database is only closed if it is open in closeDb function

This commit is contained in:
MayaTheShy
2026-03-22 02:38:17 -04:00
parent edcc19e5a4
commit 0fb57d7c94

View File

@@ -475,7 +475,9 @@ export function flushPendingSave() {
*/ */
export function closeDb() { export function closeDb() {
flushPendingSave(); flushPendingSave();
db.close(); if (db.open) {
db.close();
}
} }
export default db; export default db;