Skip to content

Commit

Permalink
Fix "Failed prop type: TimeRangePicker: prop type portalContainer i…
Browse files Browse the repository at this point in the history
…s invalid" error
  • Loading branch information
wojtekmaj committed Aug 8, 2023
1 parent f53b2d9 commit 457a7b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/TimeRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ TimeRangePicker.propTypes = {
onClockOpen: PropTypes.func,
onFocus: PropTypes.func,
openClockOnFocus: PropTypes.bool,
portalContainer: isBrowser ? PropTypes.instanceOf(HTMLElement) : undefined,
rangeDivider: PropTypes.node,
required: PropTypes.bool,
secondAriaLabel: PropTypes.string,
Expand All @@ -489,4 +488,8 @@ TimeRangePicker.propTypes = {
value: isValueOrValueArray,
};

if (isBrowser) {
TimeRangePicker.propTypes.portalContainer = PropTypes.instanceOf(HTMLElement);
}

export default TimeRangePicker;

0 comments on commit 457a7b6

Please sign in to comment.