fix electron

This commit is contained in:
zadam 2022-08-09 21:34:18 +02:00
parent 2694bcff67
commit 5705efc998
2 changed files with 5 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "trilium",
"version": "0.54.1-beta",
"version": "0.54.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "trilium",
"version": "0.54.1-beta",
"version": "0.54.2",
"hasInstallScript": true,
"license": "AGPL-3.0-only",
"dependencies": {

View File

@ -51,7 +51,9 @@ async function startTrilium() {
* its startup is slower than focusing the existing process/window. So in the end it works out without having
* to do complex evaluation.
*/
require("electron").app.requestSingleInstanceLock();
if (utils.isElectron()) {
require("electron").app.requestSingleInstanceLock();
}
app.set('port', port);
app.set('host', host);