From 82f147f4fe25ed38d7b097717fba5f10801f5570 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 7 Jan 2016 00:49:59 +0000 Subject: [PATCH] Avoid error if title_queue is not defined yet --- phpgwapi/js/jsapi/egw_links.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/js/jsapi/egw_links.js b/phpgwapi/js/jsapi/egw_links.js index ff8b201f17..bb080844c5 100644 --- a/phpgwapi/js/jsapi/egw_links.js +++ b/phpgwapi/js/jsapi/egw_links.js @@ -447,8 +447,8 @@ egw.extend('links', egw.MODULE_GLOBAL, function() // cache locally title_cache[app][id] = title; // call callbacks waiting for title of app/id - if(typeof title_queue[app] != 'undefined' && - typeof title_queue[app][id] != "undefined" + if(typeof title_queue[app] !== 'undefined' && + typeof title_queue[app][id] !== "undefined" ) { for(var i=0; i < title_queue[app][id].length; ++i) @@ -456,8 +456,8 @@ egw.extend('links', egw.MODULE_GLOBAL, function() var callback = title_queue[app][id][i]; callback.callback.call(callback.context, title); } + delete title_queue[app][id]; } - delete title_queue[app][id]; } } },