mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Added try/catch handling and some comments
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
const { contextBridge, ipcRenderer, webUtils } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld("explorer", {
|
||||
onFileDrop: (file) => webUtils.getPathForFile(file)
|
||||
})
|
||||
try {
|
||||
contextBridge.exposeInMainWorld("explorer", {
|
||||
onFileDrop: (file) => webUtils.getPathForFile(file)
|
||||
})
|
||||
} catch (error) {
|
||||
console.log("Error in preload.js");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user