On the account summary page, OD API was using /\d+?/ to scrape item
totals. In Javascript, this regular expression matches the minimum
possible match, i.e. one digit, even when the total had more than one
digit. So, for example, if a patron had 10 items out, the checked out
totals on the account summary page in OD API would show 1 item out.
(The totals at the top right of the page are correct.)
This commit fixes the regex.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
if arguments.length is 0
# Parse a list of totals of physical items from the account summary table
- totals = ( +(v.textContent.match(/\d+?/)[0]) for v in @find('td').not '[align="right"]' )
+ totals = ( +(v.textContent.match(/\d+/)[0]) for v in @find('td').not '[align="right"]' )
tpl = _.template """
<tbody>