We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents acbe770 + 0589d8f commit fe85b37Copy full SHA for fe85b37
1 file changed
src/components/AttachmentPicker/index.native.tsx
@@ -239,9 +239,10 @@ function AttachmentPicker({
239
destination: 'cachesDirectory',
240
});
241
242
- return pickedFiles.map((file, index) => {
243
- const localCopy = localCopies[index];
244
- if (localCopy.status !== 'success') {
+ return pickedFiles.map((file) => {
+ const localCopy = localCopies.find((copy) => copy.sourceUri === file.uri);
+
245
+ if (!localCopy || localCopy.status !== 'success') {
246
throw new Error("Couldn't create local file copy");
247
}
248
0 commit comments