webstaff: make sure copy_notes() contains an array before pushing to it
authorMike Rylander <mrylander@gmail.com>
Tue, 13 Oct 2015 15:41:12 +0000 (11:41 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:51 +0000 (14:58 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 031a43b..a990e73 100644 (file)
@@ -1415,6 +1415,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
                     if (note.initials) note.value += ' [' + note.initials + ']';
                     angular.forEach(copy_list, function (cp) {
+                        if (!angular.isArray(cp.notes())) cp.notes([]);
                         var n = new egCore.idl.acpn();
                         n.isnew(1);
                         n.creator(note.creator);