Skip to content

Commit

Permalink
docs: removes unused import in preload script (#35324)
Browse files Browse the repository at this point in the history
* Remove unused import of path

This import gives out the error in the preload script:

Error: module not found: path
    at preloadRequire

* Removes unused import in preload script

notes: Removes unused import which causes issue in preload script of drag and drop tutorial

* Remove import path as it is not used in the script

note: Removes import path as it is not used in the script
  • Loading branch information
lambainsaan committed Aug 15, 2022
1 parent a8934d2 commit 4cb57ad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/fiddles/features/drag-and-drop/preload.js
@@ -1,5 +1,4 @@
const { contextBridge, ipcRenderer } = require('electron')
const path = require('path')

contextBridge.exposeInMainWorld('electron', {
startDrag: (fileName) => {
Expand Down
1 change: 0 additions & 1 deletion docs/tutorial/native-file-drag-drop.md
Expand Up @@ -22,7 +22,6 @@ In `preload.js` use the [`contextBridge`] to inject a method `window.electron.st

```js
const { contextBridge, ipcRenderer } = require('electron')
const path = require('path')

contextBridge.exposeInMainWorld('electron', {
startDrag: (fileName) => {
Expand Down

0 comments on commit 4cb57ad

Please sign in to comment.