LP#1788680 prevent copy template apply failure on null stat cats master
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 8 Jun 2018 19:09:54 +0000 (12:09 -0700)
committerDan Wells <dbw2@calvin.edu>
Tue, 14 May 2019 17:05:41 +0000 (13:05 -0400)
commit1adb00509209c3ebd223701612b1f2692b17e3bc
tree2c2f5135cd6a1c94882dc2972a1248287193eb9e
parent73ee4b05b38597b2d981ef7675e62cd7d9738c33
LP#1788680 prevent copy template apply failure on null stat cats

Under some circumstances, the current code can result in a JS failure:

Cannot read property 'filter' of undefined

When this happens, the copy template may apply partially or not at all.
This change simply makes sure cp.stat_cat_entries() exists before
attempting to filter it.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js