diff --git a/docs/fiddles/features/web-usb/main.js b/docs/fiddles/features/web-usb/main.js index 580c6686bcc3..14983093c6bb 100644 --- a/docs/fiddles/features/web-usb/main.js +++ b/docs/fiddles/features/web-usb/main.js @@ -1,5 +1,4 @@ const {app, BrowserWindow} = require('electron') -const e = require('express') const path = require('path') function createWindow () { @@ -44,7 +43,6 @@ function createWindow () { } }) - mainWindow.webContents.session.setDevicePermissionHandler((details) => { if (details.deviceType === 'usb' && details.origin === 'file://') { if (!grantedDeviceThroughPermHandler) { diff --git a/docs/fiddles/features/web-usb/renderer.js b/docs/fiddles/features/web-usb/renderer.js index 3983a6fbf773..8544353f0fb9 100644 --- a/docs/fiddles/features/web-usb/renderer.js +++ b/docs/fiddles/features/web-usb/renderer.js @@ -1,5 +1,5 @@ function getDeviceDetails(device) { - return grantedDevice.productName || `Unknown device ${grantedDevice.deviceId}` + return device.productName || `Unknown device ${device.deviceId}` } async function testIt() {