Fix crash when location is not provided
This commit is contained in:
@@ -151,7 +151,7 @@ function configureApp(req, res, next) {
|
||||
var data = req.body;
|
||||
|
||||
if ('location' in data && typeof data.location !== 'string') return next(new HttpError(400, 'location must be string'));
|
||||
data.location = addSpacesSuffix(data.location, req.user);
|
||||
if ('location' in data) data.location = addSpacesSuffix(data.location, req.user);
|
||||
if ('domain' in data && typeof data.domain !== 'string') return next(new HttpError(400, 'domain must be string'));
|
||||
if ('portBindings' in data && typeof data.portBindings !== 'object') return next(new HttpError(400, 'portBindings must be an object'));
|
||||
if ('accessRestriction' in data && typeof data.accessRestriction !== 'object') return next(new HttpError(400, 'accessRestriction must be an object'));
|
||||
|
||||
Reference in New Issue
Block a user