X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8dae890a7645fba17a44d84f78be03d993e22ccb..00a51bff99bccedffee33cdc4a402825d7ffe99e:/app/helpers/browse_helper.rb diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index 0470d41a2..c4ce41b06 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -114,17 +114,9 @@ module BrowseHelper # the correct page. lookup_us = lookup.tr(" ", "_") - if page = begin - WIKI_PAGES[locale][type][lookup_us] - rescue - nil - end + if page = WIKI_PAGES.dig(locale, type, lookup_us) url = "http://wiki.openstreetmap.org/wiki/#{page}?uselang=#{locale}" - elsif page = begin - WIKI_PAGES["en"][type][lookup_us] - rescue - nil - end + elsif page = WIKI_PAGES.dig("en", type, lookup_us) url = "http://wiki.openstreetmap.org/wiki/#{page}?uselang=#{locale}" end