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
This commit is contained in:
Jacobo Aragunde Pérez 2011-11-14 14:33:35 +01:00
parent 996783c9a8
commit b6eaea14fd

View file

@ -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