timbru31 commented on a change in pull request #154:
URL: https://github.com/apache/cordova-electron/pull/154#discussion_r439288588
##########
File path: bin/templates/platform_www/cdv-electron-main.js
##########
@@ -62,10 +89,27 @@ function createWindow () {
});
}
+function configureProtocol () {
+ protocol.registerFileProtocol(scheme, (request, _cb) => {
+ const url = request.url.substr(basePath.length + 1);
+ _cb({ path: path.normalize(`${__dirname}/${url}`) });
+ }, (error) => {
+ if (error) console.error('Failed to register protocol');
Review comment:
Shouldn't the actual error message be logged, too?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]