From f920250230b564373911c895f18a57ab464be937 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Sat, 22 Feb 2020 14:00:18 +0100 Subject: [PATCH] Sort variants alphabetically --- client/src/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/store.js b/client/src/store.js index 60e01b97..91f9bdd8 100644 --- a/client/src/store.js +++ b/client/src/store.js @@ -13,7 +13,7 @@ export const store = { socketCloseListener: null, initialize() { ajax("/variants", "GET", res => { - this.state.variants = res.variantArray; + this.state.variants = res.variantArray.sort((v1,v2) => v1.localeCompare(v2)); }); let mysid = localStorage.getItem("mysid"); // Assign mysid only once (until next time user clear browser data) -- 2.44.0