From b6eaea14fddc24adb7873d4633e60855b9f09d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 14 Nov 2011 14:33:35 +0100 Subject: [PATCH] Fix warning in the JavaScript code when trying to access a method of a null object. The method jq() always returns an array, so we have to check the length of the array to know when the search is empty. FEA: ItEr75S04BugFixing --- ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js b/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js index 09daa881c..d190da010 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js +++ b/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js @@ -191,7 +191,7 @@ ganttz.TaskComponent = zk.$extends(zul.Widget, { this.mouseOverTask = true; this._tooltipTimeout = setTimeout(jq.proxy(function(offset) { var element = jq("#tasktooltip" + this.uuid); - if (element!=null) { + if (element.length > 0) { element.show(); offset = ganttz.GanttPanel.getInstance().getXMouse() - element.parent().offset().left