From bf2013d1a0648daf6075067584fe08b3da93578c Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Fri, 8 Jun 2018 12:09:54 -0700 Subject: [PATCH] LP#1772062: prevent copy template apply failure on null stat cats and non-null statcat filter Signed-off-by: Jeff Davis --- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 1ddae632b7..258a735d69 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -1206,11 +1206,13 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , // trim out all deleted ones; the API used to // do the update doesn't actually consult // isdeleted for stat cat entries - cp.stat_cat_entries( - cp.stat_cat_entries().filter(function (e) { - return !Boolean(e.isdeleted()); - }) - ); + if (cp.stat_cat_entries()) { + cp.stat_cat_entries( + cp.stat_cat_entries().filter(function (e) { + return !Boolean(e.isdeleted()); + }) + ); + } cp.ischanged(1); } -- 2.11.0