Skip to content

Commit

Permalink
Merge pull request #1168 from samchon/features/clone
Browse files Browse the repository at this point in the history
Fix `$clone()` function for `File` class case.
  • Loading branch information
samchon authored Jul 17, 2024
2 parents 7de5ecb + 866fa7a commit 66bf41d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functional/$clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const $cloneMain = (value: any): any => {
else if (value instanceof SharedArrayBuffer) return value.slice(0);
else if (value instanceof DataView)
return new DataView(value.buffer.slice(0));
else if (value instanceof Blob)
return new Blob([value], { type: value.type });
else if (value instanceof File)
return new File([value], value.name, { type: value.type });
else if (value instanceof Blob)
return new Blob([value], { type: value.type });
else if (value instanceof Set) return new Set([...value].map($cloneMain));
else if (value instanceof Map)
return new Map(
Expand Down

0 comments on commit 66bf41d

Please sign in to comment.