diff options
author | 2022-04-22 15:04:21 -0500 | |
---|---|---|
committer | 2022-04-22 20:04:21 +0000 | |
commit | 759d93dc198a3cc8c5265245c0144efa5435682b (patch) | |
tree | 53e963a085d3d12af5a2efa2f1ab6f3e5574edc7 /src/electron/ipc-api/sessionStorage.ts | |
parent | Added build scripts for linux, macos and windows to help new contributors get... (diff) | |
download | ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.tar.gz ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.tar.zst ferdium-app-759d93dc198a3cc8c5265245c0144efa5435682b.zip |
Turn off usage of 'debug' npm package using with electron-16 (fixes #17)
Diffstat (limited to 'src/electron/ipc-api/sessionStorage.ts')
-rw-r--r-- | src/electron/ipc-api/sessionStorage.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/electron/ipc-api/sessionStorage.ts b/src/electron/ipc-api/sessionStorage.ts index 20f0ac9d2..96acacd12 100644 --- a/src/electron/ipc-api/sessionStorage.ts +++ b/src/electron/ipc-api/sessionStorage.ts | |||
@@ -2,7 +2,8 @@ import { ipcMain, Session, session } from 'electron'; | |||
2 | 2 | ||
3 | import { TODOS_PARTITION_ID } from '../../config'; | 3 | import { TODOS_PARTITION_ID } from '../../config'; |
4 | 4 | ||
5 | const debug = require('debug')('Ferdium:ipcApi:sessionStorage'); | 5 | // TODO: Go back to 'debug' from 'console.log' when https://github.com/electron/electron/issues/31689 is fixed |
6 | // const debug = require('debug')('Ferdium:ipcApi:sessionStorage'); | ||
6 | 7 | ||
7 | function deduceSession(serviceId: string | undefined | null): Session { | 8 | function deduceSession(serviceId: string | undefined | null): Session { |
8 | if (serviceId) { | 9 | if (serviceId) { |
@@ -21,14 +22,14 @@ export default async () => { | |||
21 | const serviceSession = deduceSession(serviceId); | 22 | const serviceSession = deduceSession(serviceId); |
22 | serviceSession.flushStorageData(); | 23 | serviceSession.flushStorageData(); |
23 | if (targetsToClear) { | 24 | if (targetsToClear) { |
24 | debug('Clearing targets:', targetsToClear); | 25 | console.log('Clearing targets:', targetsToClear); |
25 | serviceSession.clearStorageData(targetsToClear); | 26 | serviceSession.clearStorageData(targetsToClear); |
26 | } else { | 27 | } else { |
27 | debug('Clearing all targets'); | 28 | console.log('Clearing all targets'); |
28 | serviceSession.clearStorageData(); | 29 | serviceSession.clearStorageData(); |
29 | } | 30 | } |
30 | } catch (error) { | 31 | } catch (error) { |
31 | debug(error); | 32 | console.log(error); |
32 | } | 33 | } |
33 | }); | 34 | }); |
34 | 35 | ||