diff options
author | marco <marco.a.pajares@gmail.com> | 2021-08-21 03:05:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-21 06:35:27 +0530 |
commit | 7f57a8c38b668464c2fbb8dd102dccb9611bf8f4 (patch) | |
tree | 0cc87339f8a31c2fcb1616d627c7ad35be6b4335 /src/index.js | |
parent | 5.6.1-nightly.33 [skip ci] (diff) | |
download | ferdium-app-7f57a8c38b668464c2fbb8dd102dccb9611bf8f4.tar.gz ferdium-app-7f57a8c38b668464c2fbb8dd102dccb9611bf8f4.tar.zst ferdium-app-7f57a8c38b668464c2fbb8dd102dccb9611bf8f4.zip |
Check if default app protocol is different before overriding it (#1818)
Co-authored-by: Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/index.js b/src/index.js index 7634fd35b..55a6dbc0d 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -388,11 +388,10 @@ app.on('ready', () => { | |||
388 | enforceMacOSAppLocation(); | 388 | enforceMacOSAppLocation(); |
389 | 389 | ||
390 | // Register App URL | 390 | // Register App URL |
391 | if (isDevMode) { | 391 | const protocolClient = isDevMode ? 'ferdi-dev' : 'ferdi'); |
392 | app.setAsDefaultProtocolClient('ferdi-dev'); | 392 | if (!app.isDefaultProtocolClient(protocolClient) { |
393 | } else { | 393 | app.setAsDefaultProtocolClient(protocolClient); |
394 | app.setAsDefaultProtocolClient('ferdi'); | 394 | } |
395 | } | ||
396 | 395 | ||
397 | if (isWindows) { | 396 | if (isWindows) { |
398 | app.setUserTasks([ | 397 | app.setUserTasks([ |