pull/289/head
vapao 2021-01-24 10:32:04 +08:00
parent 7156d1a0da
commit d076c51c3d
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class Action extends React.Component {
_handle = (data, el) => {
const length = data.length;
if (canVisible(el.props.auth)) {
if (el && canVisible(el.props.auth)) {
if (length !== 0) data.push(<Divider key={length} type="vertical"/>)
data.push(el)
}

View File

@ -25,7 +25,7 @@ export default function () {
const data = {};
http.get('/api/monitor/')
.then(res => {
for (let item of res) {
for (let item of res.detections) {
if (!data[item.type]) {
data[item.type] = {value: item.type_alias, label: item.type_alias, children: []}
}