Skip to content

Commit

Permalink
Fix task editing when no actions are specified (pa11y#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanmanning committed Feb 7, 2017
1 parent 60f6d4b commit a350c28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion route/task/edit.js
Expand Up @@ -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';

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a350c28

Please sign in to comment.