mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-28 05:26:44 -05:00
Add check for undefined in canonicalize middleware
This commit is contained in:
parent
094a45b6be
commit
230f9c2415
@ -3,6 +3,6 @@ exports.canonicalize = displayname => displayname.normalize('NFKD').toLowerCase(
|
|||||||
|
|
||||||
exports.canonicalizeRequest =
|
exports.canonicalizeRequest =
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
req.body.username = exports.canonicalize(req.body.displayname);
|
req.body.username = req.body.displayname ? exports.canonicalize(req.body.displayname) : undefined;
|
||||||
next();
|
next();
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user