1 | export default function unsupportedProp(props, propName, componentName, location, propFullName) {
|
2 | if (process.env.NODE_ENV === 'production') {
|
3 | return null;
|
4 | }
|
5 |
|
6 | const propFullNameSafe = propFullName || propName;
|
7 |
|
8 | if (typeof props[propName] !== 'undefined') {
|
9 | return new Error(`The prop \`${propFullNameSafe}\` is not supported. Please remove it.`);
|
10 | }
|
11 |
|
12 | return null;
|
13 | } |
\ | No newline at end of file |