Browse Source

Turn the exception in protocol.registerStandardSchemes to warning

Cheng Zhao 9 years ago
parent
commit
566bb1f708
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lib/browser/api/protocol.js

+ 3 - 2
lib/browser/api/protocol.js

@@ -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)
 }