Skip to content

Commit 04aa7e9

Browse files
authored
Fix: application table view crash when app have no labels (#842)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
1 parent 2931e13 commit 04aa7e9

File tree

1 file changed

+3
-12
lines changed
  • packages/velaux-ui/src/pages/ApplicationList/components/CardContent

1 file changed

+3
-12
lines changed

packages/velaux-ui/src/pages/ApplicationList/components/CardContent/index.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { connect } from 'dva';
2-
import type { MouseEvent } from 'react';
32
import React from 'react';
43
import './index.less';
54
import { Link } from 'dva/router';
@@ -57,15 +56,6 @@ class CardContent extends React.Component<Props, State> {
5756
};
5857
}
5958

60-
handleClick = (index: number, e: MouseEvent) => {
61-
e.preventDefault();
62-
const { extendDotVisible } = this.state;
63-
this.setState({
64-
extendDotVisible: !extendDotVisible,
65-
choseIndex: index,
66-
});
67-
};
68-
6959
onDeleteAppPlan = (name: string) => {
7060
this.props.deleteAppPlan(name);
7161
};
@@ -191,6 +181,7 @@ class CardContent extends React.Component<Props, State> {
191181
return <span>{v}</span>;
192182
},
193183
},
184+
194185
{
195186
key: 'labels',
196187
title: <Translation>Labels</Translation>,
@@ -202,8 +193,8 @@ class CardContent extends React.Component<Props, State> {
202193
return (
203194
<div>
204195
<div className={more ? '' : 'table-content-label'}>
205-
{Object.keys(label)?.map((key) => {
206-
if (label && key.indexOf('ux.oam.dev') < 0 && key.indexOf('app.oam.dev')) {
196+
{label && Object.keys(label)?.map((key) => {
197+
if (label && key.indexOf('ux.oam.dev') < 0 && key.indexOf('app.oam.dev') < 0) {
207198
displayLabels++;
208199
return (
209200
<div>

0 commit comments

Comments
 (0)