[open-ils-commits] [GIT] Evergreen ILS branch master updated. 1adb00509209c3ebd223701612b1f2692b17e3bc

Evergreen Git git at git.evergreen-ils.org
Tue May 14 13:21:46 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  1adb00509209c3ebd223701612b1f2692b17e3bc (commit)
      from  73ee4b05b38597b2d981ef7675e62cd7d9738c33 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1adb00509209c3ebd223701612b1f2692b17e3bc
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date:   Fri Jun 8 12:09:54 2018 -0700

    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 at sitka.bclibraries.ca>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

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 507c4cbb10..5923b401b2 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
@@ -1302,11 +1302,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);
                     }

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list