Skip to content

Commit

Permalink
Only show deprecation message in development (#4206)
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens authored and leo committed Apr 24, 2018
1 parent 0daf9be commit fe24333
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ export class Container extends Component {
}
}

const warnUrl = execOnce(() => warn(`Warning: the 'url' property is deprecated. https://err.sh/next.js/url-deprecated`))
const warnUrl = execOnce(() => {
if (process.env.NODE_ENV !== 'PRODUCTION') {
warn(`Warning: the 'url' property is deprecated. https://err.sh/next.js/url-deprecated`)
}
})

export function createUrl (router) {
return {
Expand Down

0 comments on commit fe24333

Please sign in to comment.