Fix deep links and double clicks on second instance (#5865)
* Deep links or double clicks don't work on second instance on Windows Fixes #5864 * A snapshot a day keeps the bugs away! 📷🐛 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -58,6 +58,7 @@ console.log('Environment vars', process.env)
|
||||
console.log('Parsed CLI args', args)
|
||||
|
||||
/// Register our application to handle all "zoo-studio:" protocols.
|
||||
const singleInstanceLock = app.requestSingleInstanceLock()
|
||||
if (process.defaultApp) {
|
||||
if (process.argv.length >= 2) {
|
||||
app.setAsDefaultProtocolClient(ZOO_STUDIO_PROTOCOL, process.execPath, [
|
||||
@ -72,11 +73,8 @@ if (process.defaultApp) {
|
||||
// Must be done before ready event.
|
||||
// Checking against this lock is needed for Windows and Linux, see
|
||||
// https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app#windows-and-linux-code
|
||||
if (!IS_PLAYWRIGHT) {
|
||||
const singleInstanceLock = app.requestSingleInstanceLock()
|
||||
if (!singleInstanceLock) {
|
||||
app.quit()
|
||||
}
|
||||
if (!singleInstanceLock && !IS_PLAYWRIGHT) {
|
||||
app.quit()
|
||||
} else {
|
||||
registerStartupListeners()
|
||||
}
|
||||
|
Reference in New Issue
Block a user