When closing database, be resilient to null db

pull/272/head
Scott Nonnenberg 6 years ago
parent 5c2514ecb8
commit 6ef0eb7284

@ -749,6 +749,10 @@ async function initialize({ configDir, key, messages }) {
}
async function close() {
if (!db) {
return;
}
const dbRef = db;
db = null;
await dbRef.close();

Loading…
Cancel
Save