Fix JS error for topologies where only some nodes have networks

This commit is contained in:
David Kaltschmidt
2016-06-08 15:41:47 +02:00
parent 001daf9ecd
commit 2267a79be8

View File

@@ -545,7 +545,7 @@ export function rootReducer(state = initialState, action) {
if (networkPrefix) {
state = state.update('nodes',
nodes => nodes.map(node => node.update('networks',
networks => networks.map(n => n.set('colorKey',
networks => networks && networks.map(n => n.set('colorKey',
n.get('colorKey').substr(networkPrefix.length))))));
state = state.update('availableNetworks',