From d269e4966cf1870b98ff3c6a56a00fd83880a8e9 Mon Sep 17 00:00:00 2001 From: Benny Samir Hierl Date: Wed, 30 Dec 2020 20:25:32 +0100 Subject: [PATCH] fix sorting issue Signed-off-by: Benny Samir Hierl --- .../number-of-covild-19-vaccinations.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/number-of-covild-19-vaccinations/number-of-covild-19-vaccinations.js b/number-of-covild-19-vaccinations/number-of-covild-19-vaccinations.js index 2e6c44c..285477d 100644 --- a/number-of-covild-19-vaccinations/number-of-covild-19-vaccinations.js +++ b/number-of-covild-19-vaccinations/number-of-covild-19-vaccinations.js @@ -1,7 +1,15 @@ // Variables used by Scriptable. // These must be at the very top of the file. Do not edit. // icon-color: red; icon-glyph: syringe; -// Version 1.0.0 + +/************** +Version 1.0.1 + +Changelog: + v1.0.1: + - fix sorting issue + +/**************/ //////////////////////////////////////////////////////////////////////////////// ////////////////////////// User-Config ///////////////////////// @@ -223,7 +231,7 @@ if (config.widgetFamily === 'large') { const stack = widget.addStack() stack.layoutVertically() stack.spacing = spacing - for (const [key, value] of Object.entries(result.states)) { + for (const [key, value] of Object.entries(result.states).sort((a, b) => a[0].localeCompare(b[0]))) { const row = stack.addStack() row.layoutHorizontally() const stateText = row.addText(key)