|
|
@@ -25,10 +25,7 @@ export default class SiderMenu extends PureComponent {
|
|
|
|
|
|
static getDerivedStateFromProps(props, state) {
|
|
|
const { pathname, flatMenuKeysLen } = state;
|
|
|
- if (
|
|
|
- props.location.pathname !== pathname ||
|
|
|
- props.flatMenuKeys.length !== flatMenuKeysLen
|
|
|
- ) {
|
|
|
+ if (props.location.pathname !== pathname || props.flatMenuKeys.length !== flatMenuKeysLen) {
|
|
|
return {
|
|
|
pathname: props.location.pathname,
|
|
|
flatMenuKeysLen: props.flatMenuKeys.length,
|