promise all sync

This commit is contained in:
fyears
2021-11-06 22:53:52 +08:00
parent 2012758383
commit b6df3f7ed5
+3 -1
View File
@@ -290,6 +290,7 @@ export const doActualSync = async (
keyStates: Record<string, FileOrFolderMixedState>,
password: string = ""
) => {
await Promise.all(
Object.entries(keyStates)
.sort((k, v) => -(k as string).length)
.map(async ([k, v]) => {
@@ -388,5 +389,6 @@ export const doActualSync = async (
} else {
throw Error("this should never happen!");
}
});
})
);
};