X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/57f5b7840e540fd8b2240fe7786e989fb2f829af..f7492b0e4945a97db948a3df1d1dcd5f6684ebb1:/lib/id.rb diff --git a/lib/id.rb b/lib/id.rb index 4e6cf3b7c..87c4a194e 100644 --- a/lib/id.rb +++ b/lib/id.rb @@ -1,3 +1,3 @@ module ID - LOCALES = Locale.list(Rails.root.join("vendor/assets/iD/iD/locales").entries.map { |p| p.basename.to_s[/(.*).json/] && Regexp.last_match(1) }.compact) + LOCALES = Locale.list(Rails.root.join("vendor/assets/iD/iD/locales").entries.filter_map { |p| p.basename.to_s[/(.*).json/] && Regexp.last_match(1) }) end