Skip to content

Commit

Permalink
Merge pull request #3008 from catchpoint/fix_location
Browse files Browse the repository at this point in the history
Fix location when there is only a single browser
  • Loading branch information
claud-io authored Dec 11, 2023
2 parents 39005bd + 79fcee2 commit 771bbbc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions www/common_lib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ function BuildLocations(&$locations)
foreach ($parts as $browser) {
$browsers[] = trim($browser);
}
if (count($browsers) > 1) {
if (count($browsers)) {
// default to the first browser in the list
if ($default == $value) {
$default .= ':' . $browsers[0];
Expand All @@ -704,10 +704,6 @@ function BuildLocations(&$locations)

$locations[$label] = $cfg;
}
} else {
// for single-browser locations, just copy it over as it exists
$location[$index] = $value;
$index++;
}
}
}
Expand Down

0 comments on commit 771bbbc

Please sign in to comment.