Fix task editing when no actions are specified (#178)

This commit is contained in:
Rowan Manning
2017-02-07 13:20:36 +00:00
committed by GitHub
parent ce9219c01e
commit 2ec9139ab0

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with Pa11y Dashboard. If not, see <http://www.gnu.org/licenses/>.
/*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;