diff --git a/src/components/Layout/GlobalNav/Left/index.jsx b/src/components/Layout/GlobalNav/Left/index.jsx index 62144c87..e5dd7a26 100644 --- a/src/components/Layout/GlobalNav/Left/index.jsx +++ b/src/components/Layout/GlobalNav/Left/index.jsx @@ -21,7 +21,10 @@ import styles from './index.less'; export default class Left extends React.Component { static propTypes = { - items: PropTypes.arrayOf(navItemPropType), + items: PropTypes.oneOfType([ + PropTypes.arrayOf(navItemPropType), + PropTypes.array, + ]), onClose: PropTypes.func, }; diff --git a/src/components/Layout/GlobalNav/Right/index.jsx b/src/components/Layout/GlobalNav/Right/index.jsx index 2d40533b..1be888e2 100644 --- a/src/components/Layout/GlobalNav/Right/index.jsx +++ b/src/components/Layout/GlobalNav/Right/index.jsx @@ -24,7 +24,10 @@ const { Search } = Input; export default class Right extends React.Component { static propTypes = { - items: PropTypes.arrayOf(navItemPropType), + items: PropTypes.oneOfType([ + PropTypes.arrayOf(navItemPropType), + PropTypes.array, + ]), onClose: PropTypes.func, }; @@ -98,7 +101,7 @@ export default class Right extends React.Component { const { name = '' } = item || {}; return ( -