Closed dstillman closed 6 years ago
I ended up creating an item signature based on its visible metadata and the key. If two items within the set share the same signature, that item is considered duplicate and removed. Signature is also used as React's key.
When searching for "frank herbert", the first three ISBNs are 9780805775143, 9780804426664, and 9780893700362. The first one in the second three is 9780804466172, which results in an ISBN field of "9780804426664 9780804466172", so when the DOI is extracted from there it becomes 9780804426664.
Maybe easiest to just skip duplicate ids? Technically the underlying metadata might be different, but there's no way of knowing that ahead of time. Alternatively we could 1) skip only if the visible metadata shown to the user is the same or 2) change the key handling so that React doesn't complain, but it's probably not worth it.