ID is a string when pulled from the route and a number when
pulled from patron search, so the type mismatch causes the
duplicate check to fail. This converts the ID to a number
before appending it to the array of recent patrons.
To test:
1. Set "Number of Retrievable Recent Patrons" setting to 2
2. Load a patron from Patron Search
3. Go to Circulation->Retrieve Last Patron
4. Go to Circulation->Retrieve Recent Patrons
- note that the patron is not duplicated
Signed-off-by: Dan Briem <dbriem@wlsmail.org>
if (service.maxRecentPatrons < 1) return;
// no need to re-track same user
+ user_id = Number(user_id);
if (service.current && service.current.id() == user_id) return;
var patrons =