Skip to content

Fixes issue that occurs when req.body.facilities is undefined#2

Open
travellingprog wants to merge 1 commit intosimonholmes:chapter-10from
travellingprog:chapter-10-facilities-fix
Open

Fixes issue that occurs when req.body.facilities is undefined#2
travellingprog wants to merge 1 commit intosimonholmes:chapter-10from
travellingprog:chapter-10-facilities-fix

Conversation

@travellingprog
Copy link

According to Mongoose schema for Location, the facilities property is not required. However, if this property is undefined when doing a POST or PUT for a location, Node will error out because undefined does not have a split() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant