Allow running both an instance of a Heynote production build, and a dev instance

This commit is contained in:
Jonatan Heyman 2023-01-13 01:57:50 +01:00
parent 3d20ac30be
commit c2036e7e6b

View File

@ -24,11 +24,12 @@ if (release().startsWith('6.1')) app.disableHardwareAcceleration()
// Set application name for Windows 10+ notifications
if (process.platform === 'win32') app.setAppUserModelId(app.getName())
if (!app.requestSingleInstanceLock()) {
if (!process.env.VITE_DEV_SERVER_URL && !app.requestSingleInstanceLock()) {
app.quit()
process.exit(0)
}
// Remove electron security warnings
// This warning only shows in development mode
// Read more on https://www.electronjs.org/docs/latest/tutorial/security