Skip to content

Commit

Permalink
fix: Fix loadBalancerIngress undefined error
Browse files Browse the repository at this point in the history
Signed-off-by: leoliu <leoliu@yunify.com>
  • Loading branch information
leoliu committed Aug 19, 2020
1 parent aadf885 commit c394011
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export default class Components extends Component {
getExternalIP(gateway) {
let ip = '-'

if (isEmpty(gateway.externalIPs)) {
if (!isEmpty(gateway.loadBalancerIngress)) {
ip = gateway.loadBalancerIngress.join('; ')
} else {
} else if (!isEmpty(gateway.externalIPs)) {
ip = gateway.externalIPs.join('; ')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export default class Item extends React.Component {
getExternalIP(gateway) {
let ip = '-'

if (isEmpty(gateway.externalIPs)) {
if (!isEmpty(gateway.loadBalancerIngress)) {
ip = gateway.loadBalancerIngress.join('; ')
} else {
} else if (!isEmpty(gateway.externalIPs)) {
ip = gateway.externalIPs.join('; ')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ class InternetAccess extends React.Component {
getExternalIP(gateway) {
let ip = '-'

if (isEmpty(gateway.externalIPs)) {
if (!isEmpty(gateway.loadBalancerIngress)) {
ip = gateway.loadBalancerIngress.join('; ')
} else {
} else if (!isEmpty(gateway.externalIPs)) {
ip = gateway.externalIPs.join('; ')
}

Expand Down

0 comments on commit c394011

Please sign in to comment.