From b86173ad169bd2e8e89ddd967d103c29759bece0 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 27 Nov 2013 00:13:56 +0000 Subject: [PATCH] Fix warning to only come when app JS object is missing --- phpgwapi/js/jsapi/egw.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/phpgwapi/js/jsapi/egw.js b/phpgwapi/js/jsapi/egw.js index 22f9f12792..485b17f63e 100644 --- a/phpgwapi/js/jsapi/egw.js +++ b/phpgwapi/js/jsapi/egw.js @@ -159,18 +159,14 @@ // Initialize application js var callback = null; // Only initialize once - if(typeof app[window.egw_appName] == "function") + if(typeof app[window.egw_appName] == "object") { - (function() { new app[window.egw_appName]();}).call(); + callback = function(et2) {app[window.egw_appName].et2_ready(et2);}; } else { egw.debug("warn", "Did not load '%s' JS object",window.egw_appName); } - if(typeof app[window.egw_appName] == "object") - { - callback = function(et2) {app[window.egw_appName].et2_ready(et2);}; - } var node = document.getElementById(data.DOMNodeID); if(!node) {