Avoid potential runtime error on My Account main page
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 10 May 2016 17:06:09 +0000 (10:06 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 10 May 2016 17:06:09 +0000 (10:06 -0700)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
src/od_pages_myopac.coffee

index 106a578..3d174d8 100644 (file)
@@ -64,7 +64,7 @@ define [
 
                        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] if v.textContent.match(/\d+/)) for v in @find('td').not '[align="right"]' )
 
                                tpl = _.template """
                                <tbody>