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

Fixed typescript error

Co-authored-by: Leon Schwanitz <leon@28minds.com>
This commit is contained in:
trop[bot]
2022-09-13 13:32:36 -07:00
committed by GitHub
parent 73deb5f56d
commit 328368be56

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