From 16cb8e2cf787804ce47f5ff8bd0b4c4c7baa5e63 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 8 Mar 2019 12:09:07 -0500 Subject: [PATCH] LP1803584 Avoid JS errors when clearing copy templates Minor fix to sanity check multi-copy data in the copy template editor after clearing the template contents. This cleans up some ugly console errors. Signed-off-by: Bill Erickson Signed-off-by: Dan Pearl --- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 a9c28c976e..287524cb0d 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 @@ -1200,7 +1200,8 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , var keys = Object.keys($scope.working.MultiMap); // for-loop for shortcut exit for (var i = 0; i < keys.length; i++) { - if ($scope.working.MultiMap[keys[i]].length > 1) { + if ($scope.working.MultiMap[keys[i]] && + $scope.working.MultiMap[keys[i]].length > 1) { return true; } } -- 2.11.0