Skip to content

Commit

Permalink
Use case-insensitive sort for games
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Mar 7, 2024
1 parent 84d2261 commit 72e8468
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h1>Options</h1>
<script src="js/settings/settings.js?v=5"></script>
<script src="js/env.js?v=5"></script>
<script src="js/input/input.js?v=3"></script>
<script src="js/gameList.js?v=3"></script>
<script src="js/gameList.js?v=4"></script>
<script src="js/stream/stream.js?v=7"></script>
<script src="js/room.js?v=3"></script>
<script src="js/network/ajax.js?v=3"></script>
Expand Down
2 changes: 1 addition & 1 deletion web/js/gameList.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const gameList = (() => {
i > list.length ? i = list.length - 1 :
(i % list.length + list.length) % list.length
},
set: (data = []) => list = data.sort((a, b) => a.title > b.title ? 1 : -1),
set: (data = []) => list = data.sort((a, b) => a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1),
empty: () => list.length === 0
}
})()
Expand Down

0 comments on commit 72e8468

Please sign in to comment.