1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make starting of application synchronous for Electron main

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2023-03-02 15:38:24 +02:00
parent 8c2c7b9317
commit fdeb8260f5
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A

View File

@ -33,13 +33,15 @@ const startElectronApplicationInjectable = getInjectable({
...args: unknown[] ...args: unknown[]
) => unknown; ) => unknown;
return async (...startApplicationArgs: unknown[]) => { return (...startApplicationArgs: unknown[]) => {
beforeAnything(); beforeAnything();
beforeElectronIsReady(); beforeElectronIsReady();
await whenAppIsReady(); return (async () => {
await whenAppIsReady();
return startApplication(...startApplicationArgs); return startApplication(...startApplicationArgs);
})()
}; };
}, },