mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
chore: fix lint:js-in-markdown script (#38260)
This commit is contained in:
@@ -23,7 +23,7 @@ function createWindow () {
|
||||
if (portList && portList.length > 0) {
|
||||
callback(portList[0].portId)
|
||||
} else {
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
// eslint-disable-next-line n/no-callback-literal
|
||||
callback('') // Could not find any matching devices
|
||||
}
|
||||
})
|
||||
|
||||
@@ -24,9 +24,7 @@ function createWindow () {
|
||||
event.preventDefault()
|
||||
if (details.deviceList && details.deviceList.length > 0) {
|
||||
const deviceToReturn = details.deviceList.find((device) => {
|
||||
if (!grantedDeviceThroughPermHandler || (device.deviceId !== grantedDeviceThroughPermHandler.deviceId)) {
|
||||
return true
|
||||
}
|
||||
return !grantedDeviceThroughPermHandler || (device.deviceId !== grantedDeviceThroughPermHandler.deviceId)
|
||||
})
|
||||
if (deviceToReturn) {
|
||||
callback(deviceToReturn.deviceId)
|
||||
|
||||
@@ -3,9 +3,7 @@ const path = require('path')
|
||||
|
||||
async function handleFileOpen () {
|
||||
const { canceled, filePaths } = await dialog.showOpenDialog()
|
||||
if (canceled) {
|
||||
|
||||
} else {
|
||||
if (!canceled) {
|
||||
return filePaths[0]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user