test if the required method is available on framework

This commit is contained in:
Klaus Leithoff 2013-10-10 15:38:18 +00:00
parent 025d20f2d1
commit 43d73abbcd

View File

@ -277,7 +277,7 @@ function egw_message(_msg, _type)
_type = _msg.match(/error/i) ? 'error' : 'success';
var framework = egw_getFramework();
if (framework)
if (framework && (typeof framework.setMessage != 'undefined'))
{
framework.setMessage.call(window.framework, _msg, _type);
return;