Skip to content

Commit 430037c

Browse files
authored
Suppress v7 warnings in production build (#12509)
1 parent 8006afe commit 430037c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
- petersendidit
216216
- promet99
217217
- pyitphyoaung
218+
- rakleed
218219
- refusado
219220
- rimian
220221
- robbtraister

packages/react-router/lib/deprecations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { FutureConfig as RenderFutureConfig } from "./components";
44
const alreadyWarned: { [key: string]: boolean } = {};
55

66
export function warnOnce(key: string, message: string): void {
7-
if (!alreadyWarned[message]) {
7+
if (__DEV__ && !alreadyWarned[message]) {
88
alreadyWarned[message] = true;
99
console.warn(message);
1010
}

0 commit comments

Comments
 (0)