mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-27 05:36:20 +10:00
Check if Table[pagination] exist
When pagination is null, a error "Cannot use 'in' operator to search for 'current' in null" will raise.
This commit is contained in:
@@ -516,7 +516,9 @@ export default class Table<T> extends React.Component<TableProps<T>, any> {
|
||||
pagination,
|
||||
};
|
||||
// Controlled current prop will not respond user interaction
|
||||
if (typeof props.pagination === 'object' && 'current' in (props.pagination as Object)) {
|
||||
if (props.pagination &&
|
||||
typeof props.pagination === 'object' &&
|
||||
'current' in (props.pagination as Object)) {
|
||||
newState.pagination = assign({}, pagination, {
|
||||
current: this.state.pagination.current,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user