From a1e5783da67660fc221d129e66995d79ee99ced2 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 16 Dec 2013 18:11:53 +0000 Subject: [PATCH] Make sure data is set before trying to look inside it. --- etemplate/js/etemplate2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index b3febba70d..dc3c21859b 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -690,7 +690,7 @@ function etemplate2_handle_load(_type, _response) } // need to set app_header before message, as message temp. replaces app_header - if (typeof data.data.app_header == 'string') + if (typeof data.data == 'object' && typeof data.data.app_header == 'string') { window.egw_app_header(data.data.app_header); delete data.data.app_header; @@ -723,7 +723,7 @@ function etemplate2_handle_load(_type, _response) { window.framework.setSidebox.apply(window.framework, data.setSidebox); } - + // regular et2 re-load if (typeof data.url == "string" && typeof data.data === 'object') {