Skip to content

Commit

Permalink
Merge pull request #11178 from ollybh/dummy-player-profiles
Browse files Browse the repository at this point in the history
Suppress profile links for dummy players
  • Loading branch information
crericha authored Sep 6, 2024
2 parents 6107d98 + 395ad90 commit c367e8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/app/lib/profile_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
module Lib
module ProfileLink
def profile_link(id, name)
# Negative ID values are used for dummy players, these do not have
# profile pages.
return h(:span, name) if id.to_i.negative?

props = {
attrs: {
href: "/profile/#{id}",
Expand Down

0 comments on commit c367e8d

Please sign in to comment.