Skip to content

Commit

Permalink
Fix MapDataController::linkUseColour return
Browse files Browse the repository at this point in the history
Not always returning a string.
  • Loading branch information
murrant committed Nov 4, 2024
1 parent 338fa74 commit a5bf342
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Maps/MapDataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ protected function linkUseColour(float $link_pct): string
{
$link_pct = round(2 * $link_pct, -1) / 2;
if ($link_pct > 100) {
$link_used = 100;
$link_pct = 100;
}
if (is_nan($link_pct)) {
$link_used = 0;
$link_pct = 0;
}

return Config::get("network_map_legend.$link_pct");
return Config::get("network_map_legend.$link_pct", '#000000');
}

protected function nodeDisabledStyle(): array
Expand Down

0 comments on commit a5bf342

Please sign in to comment.