Skip to content

Commit

Permalink
don't show location if it'd be "(?:?@)"
Browse files Browse the repository at this point in the history
The Rod Garett-style addresses are often left empty in practice, since
they're often not relevant (e.g. Gerlach, or Black Rock Station, or
unknown). It's kind of an eyesore to see those displayed as "(?:?@)"
in the incidents table.
  • Loading branch information
srabraham committed Nov 4, 2024
1 parent d99c05f commit 00d7fd9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/ims/element/static/ims.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,15 @@ function shortDescribeLocation(location) {
}
break;
case "garett":
locationBits.push(" (");
locationBits.push(padTwo(location.radial_hour));
locationBits.push(":");
locationBits.push(padTwo(location.radial_minute));
locationBits.push("@");
locationBits.push(concentricStreetFromID(location.concentric));
locationBits.push(")");
if (location.radial_hour || location.radial_minute || location.concentric) {
locationBits.push(" (");
locationBits.push(padTwo(location.radial_hour));
locationBits.push(":");
locationBits.push(padTwo(location.radial_minute));
locationBits.push("@");
locationBits.push(concentricStreetFromID(location.concentric));
locationBits.push(")");
}
break;
default:
locationBits.push(
Expand Down

0 comments on commit 00d7fd9

Please sign in to comment.