forked from external-repos/pa11y-dashboard
Fix an issue with saving empty ignore rules
This commit is contained in:
@@ -40,10 +40,11 @@ function route (app) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
req.body.ignore = req.body.ignore || [];
|
||||||
app.webservice.task(req.params.id).edit(req.body, function (err) {
|
app.webservice.task(req.params.id).edit(req.body, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
task.name = req.body.name;
|
task.name = req.body.name;
|
||||||
task.ignore = req.body.ignore || [];
|
task.ignore = req.body.ignore;
|
||||||
var standards = getStandards().map(function (standard) {
|
var standards = getStandards().map(function (standard) {
|
||||||
if (standard.title === task.standard) {
|
if (standard.title === task.standard) {
|
||||||
standard.selected = true;
|
standard.selected = true;
|
||||||
|
Reference in New Issue
Block a user