Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmartin committed Jul 25, 2023
1 parent 5b6537d commit c881540
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/hooks/useFileUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ export default function useFileUpload<T extends UploadItem = UploadItem>({
const formData = new FormData();
formData.append(field, item);

if (data)
for (const key in data)
if (data) {
for (const key in data) {
formData.append(key, data[key]);
}
}

const xhr = new XMLHttpRequest();

Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type FileUploadOptions<T extends UploadItem = UploadItem> = {
method?: string;
headers?: Headers;
timeout?: number;
data?: {[key: string]: string};
data?: { [key: string]: string };
onProgress?: (data: OnProgressData<T>) => void;
onDone?: (data: OnDoneData<T>) => void;
onError?: (data: OnErrorData<T>) => void;
Expand Down

0 comments on commit c881540

Please sign in to comment.