1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Only show deprecation message in development (#4206)

This commit is contained in:
Tim Neutkens 2018-04-24 15:25:45 -07:00 committed by Leo Lamprecht
parent 0daf9beedc
commit fe24333edc

View file

@ -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 {