webstaff serials: protect against cases where sf value is not serialized to a string
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 6 Jul 2017 21:47:10 +0000 (17:47 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 6 Jul 2017 21:47:10 +0000 (17:47 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/staff/serials/services/core.js

index ffe5bc7..5f2c2a9 100644 (file)
@@ -396,7 +396,7 @@ function(egCore , orderByFilter , $q , $filter , $uibModal , ngToast , egConfirm
                     pattern  : val
                 };
 
-                var chron_part = val.replace(/[)(]+/g,'');
+                var chron_part = String(val).replace(/[)(]+/g,'');
                 if (sf in current_values) {
                     pat_part.value = current_values[sf];
                 } else {