1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-5689: fix

This commit is contained in:
Andrew Simachev 2025-05-31 12:44:26 +02:00
parent d737b067ac
commit d387b3925d
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF

View file

@ -30,6 +30,10 @@ const Util = require('./electron/js/util.js');
const Cors = require('./electron/json/cors.json');
const csp = [];
let deeplinkingUrl = '';
let waitLibraryPromise = null;
let mainWindow = null;
MenuManager.store = store;
for (let i in Cors) {
@ -42,6 +46,10 @@ app.removeAsDefaultProtocolClient(protocol);
if (process.defaultApp) {
if (process.argv.length >= 2) {
app.setAsDefaultProtocolClient(protocol, process.execPath, [ path.resolve(process.argv[1]) ]);
if (!is.macos) {
deeplinkingUrl = argv.find(arg => arg.startsWith(`${protocol}://`));
};
};
} else {
app.setAsDefaultProtocolClient(protocol);
@ -66,10 +74,6 @@ ipcMain.on('storeDelete', (e, key) => {
e.returnValue = store.delete(key);
});
let deeplinkingUrl = '';
let waitLibraryPromise = null;
let mainWindow = null;
if (is.development && !port) {
console.error('ERROR: Please define SERVER_PORT env var');
Api.exit(mainWindow, '', false);