lint fix
This commit is contained in:
@@ -67,11 +67,10 @@ exports.createWindow = async userApi => {
|
||||
event.preventDefault()
|
||||
})
|
||||
}
|
||||
global.modules.userApiWindow.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
|
||||
if (webContents === global.modules.mainWindow.webContents) return callback(true)
|
||||
global.modules.userApiWindow.webContents.session.setPermissionRequestHandler((webContents, permission, resolve) => {
|
||||
if (webContents === global.modules.mainWindow.webContents) return resolve(true)
|
||||
|
||||
// eslint-disable-next-line node/no-callback-literal
|
||||
callback(false)
|
||||
resolve(false)
|
||||
})
|
||||
global.modules.userApiWindow.webContents.setWindowOpenHandler(() => {
|
||||
return { action: 'deny' }
|
||||
|
||||
@@ -165,7 +165,7 @@ contextBridge.exposeInMainWorld('lx', {
|
||||
headers: resp.headers,
|
||||
bytes: resp.bytes,
|
||||
raw: resp.raw,
|
||||
body: body,
|
||||
body,
|
||||
}, body)
|
||||
}).request
|
||||
|
||||
@@ -212,7 +212,7 @@ contextBridge.exposeInMainWorld('lx', {
|
||||
},
|
||||
rsaEncrypt(buffer, key) {
|
||||
buffer = Buffer.concat([Buffer.alloc(128 - buffer.length), buffer])
|
||||
return publicEncrypt({ key: key, padding: constants.RSA_NO_PADDING }, buffer)
|
||||
return publicEncrypt({ key, padding: constants.RSA_NO_PADDING }, buffer)
|
||||
},
|
||||
randomBytes(size) {
|
||||
return randomBytes(size)
|
||||
|
||||
Reference in New Issue
Block a user