Skip to content

Commit

Permalink
[Slider] Pass secret argument to PropTypes function
Browse files Browse the repository at this point in the history
Fixes mui#4854
  • Loading branch information
jacksonrayhamilton committed Aug 1, 2016
1 parent f8a29e2 commit 01c8089
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import FocusRipple from '../internal/FocusRipple';
* @param {String} componentName Name of the component whose property is being validated.
* @returns {Object} Returns an Error if min >= max otherwise null.
*/
const minMaxPropType = (props, propName, componentName) => {
const error = PropTypes.number(props, propName, componentName);
const minMaxPropType = (props, propName, componentName, ...rest) => {
const error = PropTypes.number(props, propName, componentName, ...rest);
if (error !== null) return error;

if (props.min >= props.max) {
Expand All @@ -27,8 +27,8 @@ const minMaxPropType = (props, propName, componentName) => {
* @param {String} componentName Name of the component whose property is being validated.
* @returns {Object} Returns an Error if the value is not within the range otherwise null.
*/
const valueInRangePropType = (props, propName, componentName) => {
const error = PropTypes.number(props, propName, componentName);
const valueInRangePropType = (props, propName, componentName, ...rest) => {
const error = PropTypes.number(props, propName, componentName, ...rest);
if (error !== null) return error;

const value = props[propName];
Expand Down

0 comments on commit 01c8089

Please sign in to comment.