mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-25 11:43:17 +01:00
fix bugs
This commit is contained in:
parent
f677619039
commit
26b4dc13c2
@ -1850,7 +1850,7 @@ function App() {
|
|||||||
if (append) {
|
if (append) {
|
||||||
const newUniquePaths = newPaths.filter((newPath) => !existingFiles.some(({ path: existingPath }) => newPath === existingPath));
|
const newUniquePaths = newPaths.filter((newPath) => !existingFiles.some(({ path: existingPath }) => newPath === existingPath));
|
||||||
const [firstNewUniquePath] = newUniquePaths;
|
const [firstNewUniquePath] = newUniquePaths;
|
||||||
if (firstNewUniquePath == null) throw new Error();
|
if (firstNewUniquePath == null) return existingFiles;
|
||||||
setSelectedBatchFiles([firstNewUniquePath]);
|
setSelectedBatchFiles([firstNewUniquePath]);
|
||||||
return [...existingFiles, ...mapPathsToFiles(newUniquePaths)];
|
return [...existingFiles, ...mapPathsToFiles(newUniquePaths)];
|
||||||
}
|
}
|
||||||
@ -2391,10 +2391,10 @@ function App() {
|
|||||||
key,
|
key,
|
||||||
async (_event: unknown, ...args: unknown[]) => actionWithCatch(() => fn(...args)),
|
async (_event: unknown, ...args: unknown[]) => actionWithCatch(() => fn(...args)),
|
||||||
] as const),
|
] 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]) => [
|
...Object.entries(mainActions).map(([key, fn]) => [
|
||||||
key,
|
key,
|
||||||
async () => actionWithCatch(() => fn({ keyup: false })),
|
async () => actionWithCatch(() => fn({ keyup: true })),
|
||||||
] as const),
|
] as const),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user