projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f920250
)
Sort variants alphabetically
author
Benjamin Auder
<benjamin.auder@somewhere>
Sat, 22 Feb 2020 13:01:19 +0000
(14:01 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sat, 22 Feb 2020 13:01:19 +0000
(14:01 +0100)
client/src/store.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/store.js
b/client/src/store.js
index
91f9bdd
..
e7e8697
100644
(file)
--- a/
client/src/store.js
+++ b/
client/src/store.js
@@
-13,7
+13,8
@@
export const store = {
socketCloseListener: null,
initialize() {
ajax("/variants", "GET", res => {
- this.state.variants = res.variantArray.sort((v1,v2) => v1.localeCompare(v2));
+ this.state.variants = res.variantArray.sort(
+ (v1,v2) => v1.name.localeCompare(v2.name));
});
let mysid = localStorage.getItem("mysid");
// Assign mysid only once (until next time user clear browser data)