From 2ec9139ab0a1f2d65fccf824ad60443bb0ed236c Mon Sep 17 00:00:00 2001 From: Rowan Manning Date: Tue, 7 Feb 2017 13:20:36 +0000 Subject: [PATCH] Fix task editing when no actions are specified (#178) --- route/task/edit.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/route/task/edit.js b/route/task/edit.js index aef3960..bae572b 100644 --- a/route/task/edit.js +++ b/route/task/edit.js @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Pa11y Dashboard. If not, see . -/*jshint maxcomplexity:10*/ +/*jshint maxcomplexity:12*/ 'use strict'; @@ -72,6 +72,9 @@ function route(app) { return Boolean(action); }); } + if (!req.body.actions) { + req.body.actions = []; + } req.body.username = req.body.username || undefined; req.body.password = req.body.password || undefined; req.body.hideElements = req.body.hideElements || undefined;