From fe24333edc40f19c2225ddfc55f7076df979fb44 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 24 Apr 2018 15:25:45 -0700 Subject: [PATCH] Only show deprecation message in development (#4206) --- lib/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index c4f722aef7afe..dd00614b97e94 100644 --- a/lib/app.js +++ b/lib/app.js @@ -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 {