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:
parent
d737b067ac
commit
d387b3925d
1 changed files with 8 additions and 4 deletions
12
electron.js
12
electron.js
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue