File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 3
3
namespace Moduless
4
4
{
5
5
export const inElectronMain =
6
- typeof process !== "undefined " &&
7
- ( window . process as any ) . type !== "renderer ";
6
+ typeof process === "object " &&
7
+ ( process as any ) . type === "browser ";
8
8
9
9
export const inElectronRender =
10
- typeof window !== "undefined" &&
11
- typeof window . process === "object" &&
12
- ( window . process as any ) . type === "renderer" ;
10
+ typeof process === "object" &&
11
+ ( process as any ) . type === "renderer" ;
13
12
14
- export const inNode =
15
- ! inElectronMain &&
13
+ export const inNode =
14
+ ! inElectronMain &&
16
15
! inElectronRender &&
17
- typeof process === "object" &&
16
+ typeof process === "object" &&
18
17
process . release . name === "node" ;
19
18
20
19
/**
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ namespace Moduless
137
137
{
138
138
( function isReady ( )
139
139
{
140
- if ( Electron . app . isReady ( ) )
140
+ if ( Electron . app && Electron . app . isReady ( ) )
141
141
r ( ) ;
142
142
else
143
143
setTimeout ( isReady , 5 ) ;
You can’t perform that action at this time.
0 commit comments