Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default async (req, res, userSuppliedOptions) => {
// @TODO Refactor into a lib instead of passing as an option
// e.g. and call as redirect(req, res, url)
const redirect = (redirectUrl) => {
const reponseAsJson = !!((req.body && req.body.json === 'true'))
const reponseAsJson = !!((req.body && String(req.body.json) === 'true'))
if (reponseAsJson) {
res.json({ url: redirectUrl })
} else {
Expand Down