Skip to content

Commit

Permalink
Small readability improvment
Browse files Browse the repository at this point in the history
  • Loading branch information
fiveNinePlusR committed Jan 7, 2025
1 parent a231386 commit f8b495e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/locations/_locations.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
var isSingleLocation = #{@locations.size == 1 ? true : false};

if (isSingleLocation) {
var locationName = "#{@locations.size == 0 ? '' : h(@locations[0].name)}";
var locationName = "#{h(@locations.first&.name)}";

var regionName = "#{@region ? h(@region.full_name) : ''}"
var regionName = "#{h(@region&.full_name)}"

newTitle = locationName + " - " + regionName + " Pinball Map";

document.title = newTitle;
$('meta[property="og:title"]').attr("content", newTitle);
} else {
Expand Down

0 comments on commit f8b495e

Please sign in to comment.