We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ed7b0e commit f995212Copy full SHA for f995212
1 file changed
src/utils/deprecationWarning.js
@@ -1,10 +1,16 @@
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') {
9
let message = `${oldname} is deprecated. Use ${newname} instead.`;
- console.warn(message);
10
+ warn(message);
11
12
if (link) {
- console.warn(`You can read more about it here ${link}`);
13
+ warn(`You can read more about it here ${link}`);
14
}
15
16
0 commit comments