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
This commit is contained in:
Jiri Tomasek 2017-04-05 13:07:43 +02:00
parent e79f9b5ec1
commit 51939de19b
1 changed files with 1 additions and 1 deletions

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, ''))))
);