diff --git a/docs/tutorial/native-file-drag-drop.md b/docs/tutorial/native-file-drag-drop.md index 2095777eb2..bf284cbb6d 100644 --- a/docs/tutorial/native-file-drag-drop.md +++ b/docs/tutorial/native-file-drag-drop.md @@ -22,12 +22,9 @@ In `preload.js` use the [`contextBridge`][] to inject a method `window.electron. ```js const { contextBridge, ipcRenderer } = require('electron') -const path = require('node:path') contextBridge.exposeInMainWorld('electron', { - startDrag: (fileName) => { - ipcRenderer.send('ondragstart', path.join(process.cwd(), fileName)) - } + startDrag: (fileName) => ipcRenderer.send('ondragstart', fileName) }) ```