From 5cc989cd827d85c721e094150eb44d664ceb0570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 29 Sep 2016 16:52:41 +0200 Subject: [PATCH] Fixed JS issue. JS doesn't support default function arguments. --- src/scripts/tutti/10_tasks.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index 2526d5c..9f71a02 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -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. - if (typeof options.type === 'undefined') { + if (typeof options === 'undefined' || typeof options.type === 'undefined') { throw new ReferenceError('attract_form_save(): options.type is mandatory.'); } @@ -332,4 +332,3 @@ $(function() { } }); }); -