Browse Source

Add not set value to ports filtering in selector

This change prevents errors when listing Nodes with ports
when portsDetail property is not set

Partial-bug: 1671131
Closes-Bug: 1672826
Change-Id: I5c703c7ee8fc45bc0c574af6de1217dbf3370027
changes/68/453468/4
Jiri Tomasek 3 years ago
parent
commit
51939de19b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/js/selectors/nodes.js

+ 1
- 1
src/js/selectors/nodes.js View File

@ -18,7 +18,7 @@ export const getNodesWithMacs = createSelector(
[getNodes, getPorts], (nodes, ports) =>
nodes
.map(node => node
.update('portsDetail', filterPorts(ports))
.update('portsDetail', List(), filterPorts(ports))
.update(node => node
.set('macs', node.get('portsDetail').reduce((str, v) => str + v.address, ''))))
);


Loading…
Cancel
Save