diff --git a/app/logical/sources/strategies/twitter.rb b/app/logical/sources/strategies/twitter.rb index c5520fdb2..e2c24b056 100644 --- a/app/logical/sources/strategies/twitter.rb +++ b/app/logical/sources/strategies/twitter.rb @@ -47,15 +47,15 @@ module Sources::Strategies end def profile_url - return "" if api_response.blank? - if url =~ %r{\Ahttps?://(?:mobile\.)?twitter\.com/(\w+)}i if $1 != "i" return "https://twitter.com/#{$1}" end + elsif artist_name.present? + "https://twitter.com/" + artist_name + else + "" end - - "https://twitter.com/" + artist_name end def artists