1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 10:22:31 +01:00
This commit is contained in:
Mikael Finstad 2024-03-21 23:28:30 +08:00
parent f677619039
commit 26b4dc13c2
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -1850,7 +1850,7 @@ function App() {
if (append) {
const newUniquePaths = newPaths.filter((newPath) => !existingFiles.some(({ path: existingPath }) => newPath === existingPath));
const [firstNewUniquePath] = newUniquePaths;
if (firstNewUniquePath == null) throw new Error();
if (firstNewUniquePath == null) return existingFiles;
setSelectedBatchFiles([firstNewUniquePath]);
return [...existingFiles, ...mapPathsToFiles(newUniquePaths)];
}
@ -2391,10 +2391,10 @@ function App() {
key,
async (_event: unknown, ...args: unknown[]) => actionWithCatch(() => fn(...args)),
] as const),
// all main actions (no arguments, except keyup which we don't support):
// all main actions (no arguments, so simulate keyup):
...Object.entries(mainActions).map(([key, fn]) => [
key,
async () => actionWithCatch(() => fn({ keyup: false })),
async () => actionWithCatch(() => fn({ keyup: true })),
] as const),
];