From: erickson Date: Wed, 25 Nov 2009 13:41:18 +0000 (+0000) Subject: patch from Joe Atzberger to silence some JS console warnings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8f75513b0291e63c785b2b25517a862ed6c56671;p=evergreen%2Fbjwebb.git patch from Joe Atzberger to silence some JS console warnings git-svn-id: svn://svn.open-ils.org/ILS/trunk@15023 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index 33bde75b7..ccd20e9ec 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -273,7 +273,7 @@ patron.summary.prototype = { function(e) { return function() { var val = obj.patron.ident_value(); - val = val.replace(/.+(\d\d\d\d)$/,'xxxx$1'); + if (val) val = val.replace(/.+(\d\d\d\d)$/,'xxxx$1'); // must avoid val.replace if val is NULL util.widgets.set_text(e, val); }; } @@ -298,7 +298,7 @@ patron.summary.prototype = { function(e) { return function() { var val = obj.patron.ident_value2(); - val = val.replace(/.+(\d\d\d\d)$/,'xxxx$1'); + if (val) val = val.replace(/.+(\d\d\d\d)$/,'xxxx$1'); // must avoid val.replace if val is NULL util.widgets.set_text(e, val); }; }