docs: fix typescript error in code samples (#35641)
Fixed typescript error
This commit is contained in:
parent
71ba841f0a
commit
200153da8e
1 changed files with 4 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue