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=4be8e6ae711ec7439f0ef8ad9f135af6a91591c8;p=evergreen%2Fjoelewis.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 --- 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 5b7c0796d9..8f06491ad8 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); }) }); },