From d58a3128e73e49d657db54761e2ee05c84163c69 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 16 Apr 2013 18:40:38 +0000 Subject: [PATCH] Some checking to make sure variables are there, and avoid errors --- etemplate/js/et2_extension_nextmatch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index b28c8f27ba..cfc3a9b18d 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1730,7 +1730,7 @@ var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHead // Check for global setting changes (visibility) var global_data = this.getArrayMgr("modifications").getRoot().getEntry('~custom_fields~'); - if(global_data.fields) this.options.fields = global_data.fields; + if(global_data != null && global_data.fields) this.options.fields = global_data.fields; var apps = egw.link_app_list(); for(var field_name in this.options.customfields) @@ -1846,7 +1846,7 @@ var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHead // Check for custom stuff (unlikely) var data = this.getArrayMgr("modifications").getEntry(this.id); // Check for global settings - if(!data) data = this.getArrayMgr("modifications").getRoot().getEntry('~custom_fields~', true); + if(!data) data = this.getArrayMgr("modifications").getRoot().getEntry('~custom_fields~', true) || {}; if(!data.fields) data.fields = {}; for(var field in this.options.customfields) {