Skip to content

Commit

Permalink
fix(gatsby-plugin-netlify): cast status to string (#18726)
Browse files Browse the repository at this point in the history
* fix(gatsby-plugin-netlify): cast `status` to string

* Update create-redirects.js
  • Loading branch information
visualfanatic authored and pieh committed Oct 16, 2019
1 parent c3feb78 commit 3c8623c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-netlify/src/create-redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export default async function writeRedirectsFile(
} = redirect

let status = isPermanent ? `301` : `302`
if (statusCode) status = statusCode
if (statusCode) status = String(statusCode)

if (force) status = status.concat(`!`)
if (force) status = `${status}!`

// The order of the first 3 parameters is significant.
// The order for rest params (key-value pairs) is arbitrary.
Expand Down

0 comments on commit 3c8623c

Please sign in to comment.