From: Cesar Velez Date: Thu, 2 Nov 2017 19:39:38 +0000 (-0400) Subject: LP#1722899 - Fix bug due undefined pay note value X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f4c1c11c69f2409211a85082c02a470eb1c7c807;p=Evergreen.git LP#1722899 - Fix bug due undefined pay note value Prevent error due to null or undefined pay_note.value Signed-off by: Cesar Velez Signed-off-by: Galen Charlton Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index daa5ae4fb7..1ead1cc74c 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -503,7 +503,8 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, function() { // amount confirmed add_payment_note().then(function(pay_note) { add_cc_args().then(function(cc_args) { - sendPayment(pay_note.value, cc_args); + var note_text = pay_note ? pay_note.value || '' : null; + sendPayment(note_text, cc_args); }) }); },