Commit 8e9b84bf authored by Henrik Wenz's avatar Henrik Wenz Committed by Tim Neutkens

Keep warnings when process.env.NODE_ENV is not production (#5196)

This way the warnings will work in test mode. (`process.env.NODE_ENV === „test“`)
parent ee3a73f8
......@@ -31,7 +31,7 @@ export default class Error extends React.Component {
}
}
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV !== 'production') {
Error.propTypes = {
statusCode: PropTypes.number
}
......
......@@ -78,7 +78,7 @@ export default class Router {
}
const { url, as, options } = e.state
if (process.env.NODE_ENV === 'development') {
if (process.env.NODE_ENV !== 'production') {
if (typeof url === 'undefined' || typeof as === 'undefined') {
console.warn('`popstate` event triggered but `event.state` did not have `url` or `as` https://err.sh/zeit/next.js/popstate-state-empty')
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment