From 65261dff67c576d8ecdadf0bd6a73f8fb1f8acb3 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 7cf1b068d0..401faa9a2e 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 @@ -1257,11 +1257,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