- initialize(page) {
- ajax("/variants", "GET", res => { this.state.variants = res.variantArray; });
- let mysid = localStorage["mysid"];
- if (!mysid)
- {
+ initialize() {
+ ajax("/variants", "GET", res => {
+ 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)
+ if (!mysid) {