Fix incorrect proptypes from react-router-v5 update (#27507)
This commit is contained in:
parent
70fd819935
commit
0ad66175bf
|
@ -11,7 +11,7 @@ import { HotKeys } from 'react-hotkeys';
|
||||||
|
|
||||||
import { Icon } from 'mastodon/components/icon';
|
import { Icon } from 'mastodon/components/icon';
|
||||||
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
|
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
|
||||||
import { withOptionalRouter, WithRouterPropTypes } from 'mastodon/utils/react_router';
|
import { withOptionalRouter, WithOptionalRouterPropTypes } from 'mastodon/utils/react_router';
|
||||||
|
|
||||||
import Card from '../features/status/components/card';
|
import Card from '../features/status/components/card';
|
||||||
// We use the component (and not the container) since we do not want
|
// We use the component (and not the container) since we do not want
|
||||||
|
@ -113,7 +113,7 @@ class Status extends ImmutablePureComponent {
|
||||||
inUse: PropTypes.bool,
|
inUse: PropTypes.bool,
|
||||||
available: PropTypes.bool,
|
available: PropTypes.bool,
|
||||||
}),
|
}),
|
||||||
...WithRouterPropTypes,
|
...WithOptionalRouterPropTypes,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Avoid checking props that are functions (and whose equality will always
|
// Avoid checking props that are functions (and whose equality will always
|
||||||
|
|
|
@ -49,6 +49,7 @@ export function withOptionalRouter(Component) {
|
||||||
C.displayName = displayName;
|
C.displayName = displayName;
|
||||||
C.WrappedComponent = Component;
|
C.WrappedComponent = Component;
|
||||||
C.propTypes = {
|
C.propTypes = {
|
||||||
|
...Component.propTypes,
|
||||||
wrappedComponentRef: PropTypes.oneOfType([
|
wrappedComponentRef: PropTypes.oneOfType([
|
||||||
PropTypes.string,
|
PropTypes.string,
|
||||||
PropTypes.func,
|
PropTypes.func,
|
||||||
|
|
Loading…
Reference in New Issue