Skip to content

Commit

Permalink
Fixed instrument ID clash when importing multiple instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
John Rogers committed Sep 3, 2024
1 parent 95daf62 commit 5e09708
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ export default function Upload({

// if valid import - adding to the existing fileinfos - App contains a beforeunload to stash file infors between loads within session.
if (imported.every((inst) => isValidImport(inst))) {
imported.map(
(i) => (i.instrument_id = "Imported" + String(new Date().getTime()))
);
imported.map((i) => (i.instrument_id = "Imported_" + Math.random()));
setFileInfos([...fileInfos].concat(imported));
syncFileInfos();
return imported.length;
Expand Down

0 comments on commit 5e09708

Please sign in to comment.