Skip to content

Commit

Permalink
use nullish coalescing for sitemap data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewHEguardian committed Dec 15, 2023
1 parent b1a4f1f commit b59d59b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ router.get('/sitemap.txt', async (_, res: Response) => {
const statusCode = data ? 200 : 404;
res.status(statusCode)
.contentType('text/plain')
.send(data || []);
.send(data ?? []);
})
.catch((error) => {
const errorMessage = `File ${filePath} not found`;
Expand Down

0 comments on commit b59d59b

Please sign in to comment.