When closing database, be resilient to null db
This commit is contained in:
@@ -749,6 +749,10 @@ async function initialize({ configDir, key, messages }) {
|
||||
}
|
||||
|
||||
async function close() {
|
||||
if (!db) {
|
||||
return;
|
||||
}
|
||||
|
||||
const dbRef = db;
|
||||
db = null;
|
||||
await dbRef.close();
|
||||
|
Reference in New Issue
Block a user