aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-04-23 01:59:21 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-22 23:59:21 +0000
commitd02644f7c41150709795e57bfd40351b4da35a7b (patch)
tree2403fb76bd5fae1703f8b55172ffce9e0a5d2bce /src/containers
parentComplete tray icons redesign for all platforms (#28) (diff)
downloadferdium-app-d02644f7c41150709795e57bfd40351b4da35a7b.tar.gz
ferdium-app-d02644f7c41150709795e57bfd40351b4da35a7b.tar.zst
ferdium-app-d02644f7c41150709795e57bfd40351b4da35a7b.zip
Preload safe debug shim (#29)
In https://github.com/ferdium/ferdium-app/pull/23 we removed usages of the debug package due to an electron bug. This patch aims to restore some debug functionality by introducing a shim. The shim detect whether if it is being introduced in a preload script where the electron but would be triggered, and falls back to a simple replacement for debug. However, in the main and renderer processes, where a preload script is not being used, we still get full debug functionality. In this way, a module can be used both in a preload script and outside of it, while still preserving debug functionality whenever possible. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/settings/EditSettingsScreen.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 87d1f1456..e4f7c13f1 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -37,7 +37,7 @@ import globalMessages from '../../i18n/globalMessages';
37import WorkspacesStore from '../../features/workspaces/store'; 37import WorkspacesStore from '../../features/workspaces/store';
38import ServicesStore from '../../stores/ServicesStore'; 38import ServicesStore from '../../stores/ServicesStore';
39 39
40const debug = require('debug')('Ferdium:EditSettingsScreen'); 40const debug = require('../../preload-safe-debug')('Ferdium:EditSettingsScreen');
41 41
42const messages = defineMessages({ 42const messages = defineMessages({
43 autoLaunchOnStart: { 43 autoLaunchOnStart: {