Make sure data is set before trying to look inside it.

This commit is contained in:
Nathan Gray 2013-12-16 18:11:53 +00:00
parent a014b7ba7c
commit a1e5783da6

View File

@ -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;