提交 fe24333e 编写于 作者: T Tim Neutkens 提交者: Leo Lamprecht

Only show deprecation message in development (#4206)

上级 0daf9bee
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册