Added parameter checking for undefined

This commit is contained in:
2016-10-04 14:37:50 +02:00
parent dcf503c66a
commit a9ed5e0b19

View File

@@ -121,6 +121,9 @@ function shot_create(project_url)
*/
function task_add(shot_id, task_id, task_type)
{
if (shot_id === undefined || task_id === undefined || task_type === undefined) {
throw new ReferenceError("task_add(" + shot_id + ", " + task_id + ", " + task_type + ") called.");
}
var project_url = ProjectUtils.projectUrl();
var url = '/attract/' + project_url + '/tasks/' + task_id;