Skip to content

Commit

Permalink
undo else
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash committed Jul 17, 2024
1 parent abdd405 commit f16a432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion server/routes/alerts-and-warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ async function routeHandler (request, h) {

if (hasInvalidCharacters(location, request.query.q)) {
return renderNotFound(location)
} else if (!location) {
}

if (!location) {
const data = await request.server.methods.flood.getFloods()
floods = new Floods(data)
model = new ViewModel({ location, floods })
Expand Down
4 changes: 3 additions & 1 deletion server/routes/river-and-sea-levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ async function locationQueryHandler (request, h) {

if (hasInvalidCharacters(location, request.query.q)) {
return renderNotFound(location)
} else if (!location) {
}

if (!location) {
return h.view(route, { model: emptyResultsModel() })
}

Expand Down

0 comments on commit f16a432

Please sign in to comment.