File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const getPath = async pth => {
18
18
if ( result . isDirectory ( ) ) {
19
19
return getPath ( path . join ( pth , 'index.html' ) ) ;
20
20
}
21
- } catch ( err ) { }
21
+ } catch ( error ) { }
22
22
} ;
23
23
24
24
module . exports = options => {
@@ -42,7 +42,15 @@ module.exports = options => {
42
42
} ) ;
43
43
} ;
44
44
45
- electron . protocol . registerStandardSchemes ( [ options . scheme ] , { secure : true } ) ;
45
+ if ( electron . protocol . registerStandardSchemes ) {
46
+ // Electron <= 4.x
47
+ electron . protocol . registerStandardSchemes ( [ options . scheme ] , { secure : true } ) ;
48
+ } else {
49
+ // Electron >= 5.x
50
+ electron . protocol . registerSchemesAsPrivileged ( [
51
+ { scheme : options . scheme , privileges : { secure : true , standard : true } }
52
+ ] ) ;
53
+ }
46
54
47
55
electron . app . on ( 'ready' , ( ) => {
48
56
const session = options . partition ?
You can’t perform that action at this time.
0 commit comments