routes - don't break if feature is not found

This commit is contained in:
Azgaar 2022-04-09 21:52:37 +05:00
parent 1bec723d4f
commit f2fcef0284

View file

@ -74,7 +74,7 @@ window.Routes = (function () {
const ports = allPorts.filter(b => b.port === f); // all ports on the same feature
if (!ports.length) return;
if (features[f].border) addOverseaRoute(f, ports[0]);
if (features[f]?.border) addOverseaRoute(f, ports[0]);
// get inner-map routes
for (let s = 0; s < ports.length; s++) {