Fix "delete and restart" after database error

This commit is contained in:
Fedor Indutny
2021-07-09 17:43:36 -07:00
committed by GitHub
parent 9c48a95eb5
commit 455820a9cf
3 changed files with 15 additions and 1 deletions

View File

@@ -39,6 +39,13 @@ port.on('message', async ({ seq, request }: WrappedWorkerRequest) => {
return;
}
if (request.type === 'removeDB') {
await db.removeDB();
respond(seq, undefined, undefined);
return;
}
if (request.type === 'sqlCall') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const method = (db as any)[request.method];