diff --git a/packages/gatsby-plugin-netlify/src/create-redirects.js b/packages/gatsby-plugin-netlify/src/create-redirects.js index 600dc95ebc1c7..ddfd425ae3e62 100644 --- a/packages/gatsby-plugin-netlify/src/create-redirects.js +++ b/packages/gatsby-plugin-netlify/src/create-redirects.js @@ -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.