Skip to content

Commit fe85b37

Browse files
authored
Merge pull request Expensify#67041 from callstack-internal/fix/66794-mixed-files-error
Fix mixed files error
2 parents acbe770 + 0589d8f commit fe85b37

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/AttachmentPicker/index.native.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,10 @@ function AttachmentPicker({
239239
destination: 'cachesDirectory',
240240
});
241241

242-
return pickedFiles.map((file, index) => {
243-
const localCopy = localCopies[index];
244-
if (localCopy.status !== 'success') {
242+
return pickedFiles.map((file) => {
243+
const localCopy = localCopies.find((copy) => copy.sourceUri === file.uri);
244+
245+
if (!localCopy || localCopy.status !== 'success') {
245246
throw new Error("Couldn't create local file copy");
246247
}
247248

0 commit comments

Comments
 (0)