diff --git a/src/background.ts b/src/background.ts index add6a4bd1..85551b21f 100644 --- a/src/background.ts +++ b/src/background.ts @@ -38,7 +38,7 @@ protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: tru app.allowRendererProcessReuse = false -const { ConnectionInit, ConnectionDestory } = useConnection() +const { ConnectionInit, ConnectionDestroy } = useConnection() function handleIpcMessages() { ipcMain.on('setting', (event: Electron.IpcMainEvent, ...args: any[]) => { @@ -75,7 +75,7 @@ function beforeAppQuit() { // close all log appender and rename log file with date quitAndRenameLogger() // close all SQLite connection - ConnectionDestory() + ConnectionDestroy() // quit APP app.quit() } diff --git a/src/database/useConnection.ts b/src/database/useConnection.ts index 464b93979..a2d00a26c 100644 --- a/src/database/useConnection.ts +++ b/src/database/useConnection.ts @@ -18,13 +18,13 @@ const useConnection = () => { } return sqlConnection } - async function ConnectionDestory() { + async function ConnectionDestroy() { if (sqlConnection) { await sqlConnection.close() } } return { - ConnectionDestory, + ConnectionDestroy, ConnectionInit, sqlConnection, }