Skip to content

Commit

Permalink
revert unrelated change
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Dec 29, 2023
1 parent ed744c0 commit bec3e0d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/@uppy/core/src/Uppy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export class Uppy<M extends Meta, B extends Body> {
resetProgress(): void {
const defaultProgress: Omit<FileProgressNotStarted, 'bytesTotal'> = {
percentage: 0,
bytesUploaded: false,
bytesUploaded: 0,
uploadComplete: false,
uploadStarted: null,
}
Expand Down Expand Up @@ -843,9 +843,7 @@ export class Uppy<M extends Meta, B extends Body> {
meta.type = fileType

// `null` means the size is unknown.
const size = Number.isFinite(file.data.size)
? file.data.size
: (null as never)
const size = Number.isFinite(file.data.size) ? file.data.size : null

return {
source: file.source || '',
Expand All @@ -860,15 +858,17 @@ export class Uppy<M extends Meta, B extends Body> {
data: file.data,
progress: {
percentage: 0,
bytesUploaded: false,
bytesUploaded: 0,
bytesTotal: size,
uploadComplete: false,
uploadStarted: null,
},
} as FileProgressNotStarted,
size,
isGhost: false,
isRemote: file.isRemote || false,
remote: file.remote,
// TODO: this should not be a string
// @ts-expect-error wrong
remote: file.remote || '',
preview: file.preview,
}
}
Expand Down

0 comments on commit bec3e0d

Please sign in to comment.