Move the warning of registerStandardSchemes to native code
This commit is contained in:
parent
13e1818bf7
commit
4ebb83e999
2 changed files with 9 additions and 8 deletions
|
@ -1,13 +1,7 @@
|
|||
const {app, session} = require('electron')
|
||||
const {registerStandardSchemes} = process.atomBinding('protocol')
|
||||
|
||||
exports.registerStandardSchemes = function (schemes) {
|
||||
if (app.isReady()) {
|
||||
console.warn('protocol.registerStandardSchemes should be called before app is ready')
|
||||
return
|
||||
}
|
||||
registerStandardSchemes(schemes)
|
||||
}
|
||||
exports.registerStandardSchemes = registerStandardSchemes
|
||||
|
||||
const setupProtocol = function () {
|
||||
let protocol = session.defaultSession.protocol
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue