defined

returns false if the provided argument is undefined, otherwise true

boolean defined(object task);

Parameters

taskobjectthe object that should be checked

Returns

booleanfalse if the provided argument is undefined, otherwise true

Example

// check if the "custom_property" property is defined for the task object
if(gantt.defined(task.custom_property)){
  // ..
};

Change log

added in version 4.0

Back to top