We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 615ef25 commit 274c9cbCopy full SHA for 274c9cb
src/utils/deprecationWarning.js
@@ -1,16 +1,14 @@
1
-function warn(message) {
2
- if (window.console && (typeof console.warn === 'function')) {
3
- console.warn(message);
4
- }
5
-}
6
-
7
export default function deprecationWarning(oldname, newname, link) {
8
if (process.env.NODE_ENV !== 'production') {
+ if (!window.console && (typeof console.warn !== 'function')) {
+ return;
+ }
+
9
let message = `${oldname} is deprecated. Use ${newname} instead.`;
10
- warn(message);
+ console.warn(message);
11
12
if (link) {
13
- warn(`You can read more about it here ${link}`);
+ console.warn(`You can read more about it here ${link}`);
14
}
15
16
0 commit comments