protect against nonexistent staged user
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 3 Dec 2009 14:52:22 +0000 (14:52 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 3 Dec 2009 14:52:22 +0000 (14:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15065 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/actor/user/register.js

index a8156f2..38a2e09 100644 (file)
@@ -135,6 +135,9 @@ function uEditLoadStageUser(stageUname) {
     stageUser = data.user;
     patron = uEditNewPatron();
 
+    if(!stageUser) 
+        return patron;
+
     // copy the data into our new user object
     for(var key in fieldmapper.IDL.fmclasses.stgu.field_map) {
         if(fieldmapper.IDL.fmclasses.au.field_map[key] && !fieldmapper.IDL.fmclasses.stgu.field_map[key].virtual) {