Make starting of application synchronous for Electron main

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2023-03-06 08:53:21 +02:00
1 parent 8c2c7b9317
commit fdeb8260f5
1 file changed
+5 -3
@@ -33,13 +33,15 @@ const startElectronApplicationInjectable = getInjectable({
...args: unknown[]
) => unknown;
return async (...startApplicationArgs: unknown[]) => {
return (...startApplicationArgs: unknown[]) => {
beforeAnything();
beforeElectronIsReady();
await whenAppIsReady();
return (async () => {
await whenAppIsReady();
return startApplication(...startApplicationArgs);
return startApplication(...startApplicationArgs);
})()
};
},