Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

fix: parse uri #1529

Merged
merged 4 commits into from
Nov 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ if (!gotTheLock) {
app.on('second-instance', (_, argv) => {
// Someone tried to run a second instance, we should focus our window.
// argv: An array of the second instance’s (command line / deep linked) arguments
if (process.platform === 'linux') {
deeplinkingUrl = argv[1]
broadcastURL(deeplinkingUrl)
} else if (process.platform !== 'darwin') {
deeplinkingUrl = argv[2]
broadcastURL(deeplinkingUrl)
for (const arg of argv) {
if (arg.startsWith('ark:')) {
deeplinkingUrl = arg
broadcastURL(deeplinkingUrl)
break
}
}

if (mainWindow) {
Expand All @@ -131,12 +131,12 @@ if (!gotTheLock) {
}
})

if (process.platform === 'linux') {
deeplinkingUrl = process.argv[1]
broadcastURL(deeplinkingUrl)
} else if (process.platform !== 'darwin') {
deeplinkingUrl = process.argv[2]
broadcastURL(deeplinkingUrl)
for (const arg of process.argv) {
if (arg.startsWith('ark:')) {
deeplinkingUrl = arg
broadcastURL(deeplinkingUrl)
break
}
}
}

Expand Down