Skip to content

Commit 2d7a154

Browse files
committed
fix: await promises returned from async file helper functions
1 parent 2b5de79 commit 2d7a154

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/files/updateUpload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const updateUpload = async (
4040
getOldPath: () => Promise<string | null | undefined>,
4141
setNewPath: (path: string) => Promise<any>,
4242
): Promise<FormPassBackState> => {
43-
if (isFileNotEmpty(file)) {
44-
const filePath = `${folder}/${randomBytes(16).toString("hex")}.${getFileExtension(file)}`
43+
if (await isFileNotEmpty(file)) {
44+
const filePath = `${folder}/${randomBytes(16).toString("hex")}.${await getFileExtension(file)}`
4545

4646
// Save the new file to the file system
4747
try {

0 commit comments

Comments
 (0)