mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix: injectLocale should work in IE<=10 (#5488)
This commit is contained in:
parent
f0ec7b749a
commit
0beb892971
@ -10,8 +10,12 @@ export interface ComponentContext {
|
||||
|
||||
export default (componentName: string, defaultLocale) => (
|
||||
function<P>(Component: typeof React.Component): React.ComponentClass<P> {
|
||||
const ComponentWithStatics = Component as any;
|
||||
return class extends Component<P & ComponentProps, any> {
|
||||
static propTypes = ComponentWithStatics.propTypes;
|
||||
static defaultProps = ComponentWithStatics.defaultProps;
|
||||
static contextTypes = {
|
||||
...(ComponentWithStatics.context || {}),
|
||||
antLocale: PropTypes.object,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user