Skip to content

Commit c881540

Browse files
committed
Fix lint
1 parent 5b6537d commit c881540

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/hooks/useFileUpload.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ export default function useFileUpload<T extends UploadItem = UploadItem>({
2727
const formData = new FormData();
2828
formData.append(field, item);
2929

30-
if (data)
31-
for (const key in data)
30+
if (data) {
31+
for (const key in data) {
3232
formData.append(key, data[key]);
33+
}
34+
}
3335

3436
const xhr = new XMLHttpRequest();
3537

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type FileUploadOptions<T extends UploadItem = UploadItem> = {
3333
method?: string;
3434
headers?: Headers;
3535
timeout?: number;
36-
data?: {[key: string]: string};
36+
data?: { [key: string]: string };
3737
onProgress?: (data: OnProgressData<T>) => void;
3838
onDone?: (data: OnDoneData<T>) => void;
3939
onError?: (data: OnErrorData<T>) => void;

0 commit comments

Comments
 (0)