Skip to content

Commit d2f656b

Browse files
committed
Fix the Node18 problem with path.format
1 parent c535a3f commit d2f656b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/support/media-files/file-ext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ export function addFileExtension<T extends TypeInfo>(
5858

5959
export function setExtension(fileName: string, ext: string): string {
6060
const { name } = parsePath(fileName);
61-
return formatPath({ name, ext });
61+
return formatPath({ name, ext: ext ? `.${ext}` : '' }); // Add dot for Node18 compatibility
6262
}

0 commit comments

Comments
 (0)