From a7ecc60a5ee314ef2d60b068e8edafd2db7bf152 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 27 May 2014 13:36:40 +0000 Subject: [PATCH] Make sure that _links is not undefined --- infolog/js/app.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/infolog/js/app.js b/infolog/js/app.js index 600b0d710d..9ec1ecc348 100644 --- a/infolog/js/app.js +++ b/infolog/js/app.js @@ -84,14 +84,17 @@ app.classes.infolog = AppJS.extend( */ observer: function(_msg, _app, _id, _type, _msg_type, _links) { - if (typeof _links['infolog'] != 'undefined') - { - switch (_app) - { - case 'timesheet': - var nm = this.et2 ? this.et2.getWidgetById('nm') : null; - if (nm) nm.applyFilters(); - break; + if (typeof _links != 'undefined') + { + if (typeof _links.infolog != 'undefined') + { + switch (_app) + { + case 'timesheet': + var nm = this.et2 ? this.et2.getWidgetById('nm') : null; + if (nm) nm.applyFilters(); + break; + } } } },