Skip to content

Commit b9fbc69

Browse files
committedOct 15, 2023
Improve type coercion in uploadToImageSource
1 parent e2d10dd commit b9fbc69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/docs/utilities/uploadToImageSource.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function imageSourceLoader<Key extends string>(field: Key) {
77
({
88
// We need to get the first upload in the field, because files always return an array
99
[field]: await generateImageSource(
10-
(<{ [key in Key]: string[] }>args)[field]?.[0],
10+
(args as { [key in Key]: string[] })[field]?.[0],
1111
),
1212
}) as { [key in Key]: ImageSource | null };
1313
}

0 commit comments

Comments
 (0)
Please sign in to comment.