[feat-75] fix paths of dropped zips are undefined

This commit is contained in:
MathieuG-P
2024-10-09 16:19:25 +02:00
committed by silentrald
parent 132394524e
commit e9d2cb1482
3 changed files with 10 additions and 2 deletions
@@ -110,7 +110,7 @@ export function MapsPlaylistsPanel({ version, isActive }: Props) {
for (let i = 0; i < files.length; ++i) {
const file = files[i];
if (zipMimeTypes.includes(file.type)) {
paths.push(file.path);
paths.push(window.electron.webUtils.getPathForFile(file));
}
}
+5
View File
@@ -1,3 +1,5 @@
import { webUtils } from "electron";
declare global {
interface Window {
electron: {
@@ -13,6 +15,9 @@ declare global {
basename: (path: string) => string;
join: (...args: string[]) => string;
};
webUtils: {
getPathForFile: typeof webUtils.getPathForFile;
};
};
}
}