Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporary fix for type errors #211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Dropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ class Dropzone extends React.Component<IDropzoneProps, { active: boolean; dragge
let params: IUploadParams | null = null
try {
params = await getUploadParams(fileWithMeta)
} catch (e) {
} catch (e: any) {
console.error('Error Upload Params', e.stack)
}
if (params === null) return
Expand Down Expand Up @@ -632,7 +632,7 @@ class Dropzone extends React.Component<IDropzoneProps, { active: boolean; dragge

let previews = null
if (PreviewComponent !== null) {
previews = files.map(f => {
previews: any = files.map(f => {
Comment on lines 633 to +635

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be following

let previews: any = null
if (PreviewComponent !== null) {
      previews = files.map(f => {

return (
//@ts-ignore
<Preview
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const mergeStyles = (
export const getFilesFromEvent = (
event: React.DragEvent<HTMLElement> | React.ChangeEvent<HTMLInputElement>,
): Array<File | DataTransferItem> => {
let items = null
let items: any = null

if ('dataTransfer' in event) {
const dt = event.dataTransfer
Expand Down