diff --git a/src/shared/propTypes.js b/src/shared/propTypes.js index 1c3df4ab..644e668e 100644 --- a/src/shared/propTypes.js +++ b/src/shared/propTypes.js @@ -54,7 +54,7 @@ export const isView = (props, propName, componentName) => { const allowedViews = views || allViews; - if (!allowedViews.includes(view)) { + if (allowedViews.indexOf(view) === -1) { return new Error(`Warning: Failed prop type: Invalid prop \`${propName}\` of value \`${view}\` supplied to \`${componentName}\`, expected one of [${['a', 'b', 'c', 'd', 'e'].map(a => `"${a}"`).join(', ')}].`); }