As of Evergreen 2.9, the account summary table on the main My Account
page includes an additional "Account Expiration Date" row. This broke
the OverDrive API integration layer. This commit takes the extra row
into account when rewriting the account summary table.
(As a side effect, when OverDrive API integration is enabled, the
Account Expiration Date row will not be displayed on the main My Account
page, but it's still visible in the Account Preferences tab.)
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] if v.textContent.match(/\d+/)) for v in @find('td').not '[align="right"]' )
+ totals = []
+ for v in @find('td').not '[align="right"]'
+ if ( v.textContent.match(/\d+/) && v.textContent.match('Items') )
+ totals.push v.textContent.match(/\d+/)[0]
tpl = _.template """
<tbody>