BWI_WBL: 1
};
- /* The default. Obviously wrong for when we don't
- * have the necessary data. */
- let zone = 0;
-
+ /* Compute the zone (string) for the given origin/destination pair.
+ * If we don't know it or if you chose in invalid pair (destination
+ * not on the same line as your origin?) then the empty string is
+ * returned. */
function compute_marc_zone(src, dest) {
/* Forward direction key for zone_map */
const fwd = src + "_" + dest;
* directions here. */
const rev = dest + "_" + src;
+ /* The default. Obviously wrong for when we don't
+ * have the necessary data. */
+ let zone = -1;
+
if (zone_map[fwd]) {
zone = zone_map[fwd];
}
case 4:
return "Four Zone";
default:
- return "??? Zone";
+ return "";
}
}