Permissions: 'return callback(true)' instead of 'return true'

This commit is contained in:
Scott Nonnenberg 2018-07-12 14:52:34 -07:00
parent 61d8a694b7
commit 3a2582a087

View file

@ -20,7 +20,7 @@ function _createPermissionHandler(userConfig) {
return (webContents, permission, callback) => { return (webContents, permission, callback) => {
// We default 'media' permission to false, but the user can override that // We default 'media' permission to false, but the user can override that
if (permission === 'media' && userConfig.get('mediaPermissions')) { if (permission === 'media' && userConfig.get('mediaPermissions')) {
return true; return callback(true);
} }
if (PERMISSIONS[permission]) { if (PERMISSIONS[permission]) {