From 83dbb0001134b4323acb7e50b79c67d779aff1f5 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 25 Jul 2017 17:10:48 -0400 Subject: [PATCH] offline: Make sure the the field_doc structure exists before writing to it Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/offline.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/web/js/ui/default/staff/offline.js b/Open-ILS/web/js/ui/default/staff/offline.js index dab4065b51..12cfc3fe87 100644 --- a/Open-ILS/web/js/ui/default/staff/offline.js +++ b/Open-ILS/web/js/ui/default/staff/offline.js @@ -905,6 +905,8 @@ function($routeProvider , $locationProvider , $compileProvider) { service.get_field_doc = function() { return egLovefield.getListFromOfflineCache('fdoc').then(function (list) { angular.forEach(list, function(doc) { + if (!service.field_doc[doc.fm_class()]) + service.field_doc[doc.fm_class()] = {}; service.field_doc[doc.fm_class()][doc.field()] = doc; }); return $q.when(); -- 2.11.0