Skip to content

Commit

Permalink
Suppress v7 warnings in production build (#12509)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakleed authored Jan 21, 2025
1 parent 8006afe commit 430037c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
- petersendidit
- promet99
- pyitphyoaung
- rakleed
- refusado
- rimian
- robbtraister
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/lib/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { FutureConfig as RenderFutureConfig } from "./components";
const alreadyWarned: { [key: string]: boolean } = {};

export function warnOnce(key: string, message: string): void {
if (!alreadyWarned[message]) {
if (__DEV__ && !alreadyWarned[message]) {
alreadyWarned[message] = true;
console.warn(message);
}
Expand Down

0 comments on commit 430037c

Please sign in to comment.