From 2bc3ad43c0c511e11d41ee3473d157bd3e0d1fa7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 10 Jun 2014 15:27:11 +0000 Subject: [PATCH] Avoid undefined error when links is not provided --- phpgwapi/js/jsapi/egw_message.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpgwapi/js/jsapi/egw_message.js b/phpgwapi/js/jsapi/egw_message.js index 7942153268..1627613aa3 100644 --- a/phpgwapi/js/jsapi/egw_message.js +++ b/phpgwapi/js/jsapi/egw_message.js @@ -214,12 +214,17 @@ egw.extend('message', egw.MODULE_WND_LOCAL, function(_app, _wnd) refresh: function(_msg, _app, _id, _type, _targetapp, _replace, _with, _msg_type, _links) { // Log for debugging purposes - this.debug("log", "egw_refresh(%s, %s, %s, %o, %s, %s)", _msg, _app, _id, _type, _targetapp, _replace, _with, _msg_type); + this.debug("log", "egw_refresh(%s, %s, %s, %o, %s, %s)", _msg, _app, _id, _type, _targetapp, _replace, _with, _msg_type, _links); var win = typeof _targetapp != 'undefined' ? _wnd.egw_appWindow(_targetapp) : _wnd; this.message(_msg, _msg_type); + if(typeof _links == "undefined") + { + _links = []; + } + // notify app observers: if observer for _app itself returns false, no regular refresh will take place // app's own observer can replace current app_refresh functionality var no_regular_refresh = false;