Turn the exception in protocol.registerStandardSchemes to warning

This commit is contained in:
Cheng Zhao 2016-05-09 09:49:28 +09:00
parent ab3122ef2a
commit 566bb1f708

View file

@ -1,9 +1,10 @@
const app = require('electron').app
const {app} = require('electron')
const {createProtocolObject, registerStandardSchemes} = process.atomBinding('protocol')
exports.registerStandardSchemes = function (schemes) {
if (app.isReady()) {
throw new Error('protocol.registerStandardSchemes should be called before app is ready')
console.warn('protocol.registerStandardSchemes should be called before app is ready')
return
}
registerStandardSchemes(schemes)
}