From 64774de6e1dc56b874d69a01fef2e3e99b501f11 Mon Sep 17 00:00:00 2001 From: maoling <11016631+maoling@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:27:34 +0800 Subject: [PATCH] fix a couple of invaild props (#10810) --- console-ui/src/layouts/MainLayout.js | 6 ++++-- .../PermissionsManagement/PermissionsManagement.js | 2 +- .../pages/AuthorityControl/UserManagement/UserManagement.js | 2 +- .../ServiceManagement/ServiceDetail/EditInstanceDialog.js | 4 ++-- .../pages/ServiceManagement/ServiceDetail/InstanceTable.js | 2 +- .../ServiceManagement/SubscriberList/SubscriberList.js | 4 +++- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/console-ui/src/layouts/MainLayout.js b/console-ui/src/layouts/MainLayout.js index 33bd2c7d7..b92ea4b61 100644 --- a/console-ui/src/layouts/MainLayout.js +++ b/console-ui/src/layouts/MainLayout.js @@ -39,7 +39,7 @@ class MainLayout extends React.Component { getState: PropTypes.func, functionMode: PropTypes.string, authEnabled: PropTypes.string, - children: PropTypes.object, + children: PropTypes.array, getNotice: PropTypes.func, notice: PropTypes.string, }; @@ -152,7 +152,9 @@ class MainLayout extends React.Component {
+
{k}={metadata[k]}
)); diff --git a/console-ui/src/pages/ServiceManagement/SubscriberList/SubscriberList.js b/console-ui/src/pages/ServiceManagement/SubscriberList/SubscriberList.js index 9a6bbb4b0..60989d57f 100644 --- a/console-ui/src/pages/ServiceManagement/SubscriberList/SubscriberList.js +++ b/console-ui/src/pages/ServiceManagement/SubscriberList/SubscriberList.js @@ -111,6 +111,8 @@ class SubscriberList extends React.Component { render() { const { locale = {}, subscriberData = {} } = this.props; const { count = 0, subscribers = [] } = subscriberData; + const subscribersArray = Array.isArray(subscribers) ? subscribers : []; + const { pubNoData, subscriberList, @@ -186,7 +188,7 @@ class SubscriberList extends React.Component {