docs: fix typescript error in code samples (#35641)

Fixed typescript error
This commit is contained in:
Leon Schwanitz 2022-09-13 18:38:06 +02:00 committed by GitHub
parent 71ba841f0a
commit 200153da8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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')