X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fhelpers%2FParticipant.js;h=d7bdd7c4a41055a8f7d067c2f44c1f02ffc1a5b2;hb=9bc03c27b90df8f8acfdecc5cfbcbf8226485abc;hp=7a689960ea831945428edb9aed1aa43cb3f889a4;hpb=6fe6cd1272c87bf7f89aa9ba59362e98c790c564;p=alttp.git diff --git a/resources/js/helpers/Participant.js b/resources/js/helpers/Participant.js index 7a68996..d7bdd7c 100644 --- a/resources/js/helpers/Participant.js +++ b/resources/js/helpers/Participant.js @@ -1,3 +1,5 @@ +import User from './User'; + export const compareFinished = round => (a, b) => { const a_result = findResult(a, round); const b_result = findResult(b, round); @@ -41,8 +43,8 @@ export const compareResult = round => (a, b) => { }; export const compareUsername = (a, b) => { - const a_name = a && a.user && a.user.username ? a.user.username : ''; - const b_name = b && b.user && b.user.username ? b.user.username : ''; + const a_name = a && a.user ? User.getUserName(a.user) : ''; + const b_name = b && b.user ? User.getUserName(b.user) : ''; return a_name.localeCompare(b_name); };