mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
docs: fix typescript error in code samples (#35641)
Fixed typescript error
This commit is contained in:
@@ -33,12 +33,16 @@ function createWindow () {
|
||||
if (permission === 'serial' && details.securityOrigin === 'file:///') {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
|
||||
if (details.deviceType === 'serial' && details.origin === 'file://') {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
mainWindow.loadFile('index.html')
|
||||
|
||||
Reference in New Issue
Block a user