Skip to content

Commit b31f2fc

Browse files
save some bundle size
1 parent 916b1a6 commit b31f2fc

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

packages/material-ui/src/utils/exactProp.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
export const specialProperty = 'exact-prop: \u200b';
88

99
function exactProp(propTypes: Object) {
10+
/* istanbul ignore if */
1011
if (process.env.NODE_ENV === 'production') {
1112
return propTypes;
1213
}

packages/material-ui/src/utils/requirePropFactory.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// @flow weak
22

33
function requirePropFactory(componentNameInError: string) {
4+
/* istanbul ignore if */
5+
if (process.env.NODE_ENV === 'production') {
6+
return () => null;
7+
}
8+
49
const requireProp = (requiredProp: string) => (
510
props: Object,
611
propName: string,

packages/material-ui/src/utils/unsupportedProp.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function unsupportedProp(
77
location?: string,
88
propFullName?: string,
99
) {
10+
/* istanbul ignore if */
1011
if (process.env.NODE_ENV === 'production') {
1112
return null;
1213
}

0 commit comments

Comments
 (0)