This commit is contained in:
David Négrier
2020-10-01 15:55:23 +02:00
parent d3fa901691
commit e4872c6f9d
4 changed files with 56 additions and 59 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ const handleBody = (res: HttpResponse, req: HttpRequest) => {
if (contType.includes('application/json'))
res.json = async () => JSON.parse(await res.body());
if (contTypes.map(t => contType.indexOf(t) > -1).indexOf(true) > -1)
if (contTypes.map(t => contType.includes(t)).includes(true))
res.formData = formData.bind(res, contType);
};