Fixed JS issue. JS doesn't support default function arguments.

This commit is contained in:
2016-09-29 16:52:41 +02:00
parent c0cc4547c2
commit 5cc989cd82

View File

@@ -173,10 +173,10 @@ function task_create(shot_id, project_url, task_type)
}); });
} }
function attract_form_save(form_id, item_id, item_save_url, options={}) function attract_form_save(form_id, item_id, item_save_url, options)
{ {
// Mandatory option. // Mandatory option.
if (typeof options.type === 'undefined') { if (typeof options === 'undefined' || typeof options.type === 'undefined') {
throw new ReferenceError('attract_form_save(): options.type is mandatory.'); throw new ReferenceError('attract_form_save(): options.type is mandatory.');
} }
@@ -332,4 +332,3 @@ $(function() {
} }
}); });
}); });