From e9b0b5043dc87ebc6857c255e2202a215912c4d9 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Sat, 22 Feb 2020 14:01:19 +0100 Subject: [PATCH] Sort variants alphabetically --- client/src/store.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/store.js b/client/src/store.js index 91f9bdd8..e7e86971 100644 --- 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) -- 2.44.0