diff options
Diffstat (limited to 'src/electron/deepLinking.ts')
-rw-r--r-- | src/electron/deepLinking.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/electron/deepLinking.ts b/src/electron/deepLinking.ts index 36de1b143..104aa2d83 100644 --- a/src/electron/deepLinking.ts +++ b/src/electron/deepLinking.ts | |||
@@ -4,9 +4,18 @@ export default function handleDeepLink( | |||
4 | window: BrowserWindow, | 4 | window: BrowserWindow, |
5 | rawUrl: string, | 5 | rawUrl: string, |
6 | ): void { | 6 | ): void { |
7 | if (!rawUrl) { | ||
8 | return; | ||
9 | } | ||
10 | |||
7 | const url = rawUrl.replace('ferdium://', ''); | 11 | const url = rawUrl.replace('ferdium://', ''); |
8 | 12 | ||
9 | if (!url) return; | 13 | // The next line is a workaround after this 71c5237 [chore: Mobx & React-Router upgrade (#406)]. |
14 | // For some reason, the app won't start until because it's trying to route to './build'. | ||
15 | // TODO: Check what is wrong with DeepLinking - it is broken for some reason. This is causing several troubles. | ||
16 | const workaroundDeepLink = ['./build', '--allow-file-access-from-files']; | ||
17 | |||
18 | if (!url || workaroundDeepLink.includes(url)) return; | ||
10 | 19 | ||
11 | window.webContents.send('navigateFromDeepLink', { url }); | 20 | window.webContents.send('navigateFromDeepLink', { url }); |
12 | } | 21 | } |