* Change DELETE request for projects * fixes #1165, by updating requestsOfType to check for null or undefined values * remove unnecessary whitespace changes
This commit is contained in:
parent
7e815b1dcb
commit
0b36126854
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
header does not match `type`
|
||||
*/
|
||||
const requestsOfType = type => (req, res, next) => {
|
||||
const hasContentType = req.get('content-type') !== null;
|
||||
const hasContentType = req.get('content-type') !== undefined && req.get('content-type') !== null;
|
||||
const isCorrectType = req.is(type) === null || req.is(type) === type;
|
||||
|
||||
if (hasContentType && !isCorrectType) {
|
||||
|
|
Loading…
Reference in a new issue