Gracefully handle non-presence of Place Hold link

Bug #1477675 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen Overdrive API Integration
New
Undecided
Unassigned

Bug Description

The _replace_place_hold_link function in od_pages_opac.coffee assumes the existence of a Place Hold link:

$a = @find '.place_hold > a'

But in a stock EG install, e-resource titles do not have a Place Hold link, so you get an error "TypeError: $a.prop(...) is undefined".

At minimum, that function ought to check for the existence of the element before trying to do anything with it. (We do probably want a Place Hold/Check Out link on Overdrive records even if there is no underlying Place Hold link to build on.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.