From 851299fff5a3c51d15dfff039549b4249f93032f Mon Sep 17 00:00:00 2001 From: programming-kid Date: Mon, 22 May 2017 13:32:11 +0530 Subject: [PATCH] made changes to as per updated koa-better-body made changes to as per updated koa-better-body change. https://github.com/tunnckoCore/koa-better-body/blob/master/CHANGELOG.md#200-2016-04-15 --- lib/validate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/validate.js b/lib/validate.js index 6e2ef4d..d44100c 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -16,6 +16,7 @@ module.exports = function() { if(this.request.body && this.request.body.fields) fields = this.request.body.fields; else if (this.request.body) fields = this.request.body; + else if (this.request.fields) fields = this.request.fields; else fields = {}; v = new FieldValidator(