wowtoken.app

git clone https://git.emily.sh/wowtoken-app/wowtoken.app.git
Log | Files | Refs | README | LICENSE

commit 8c8499fb1c58941b3cefbb1520fbcfeefdadb66a
parent 0180e8a3b59a79f1da202abd59bbe403e84726e9
Author: Emily Doherty <git@emily.sh>
Date:   Sun,  3 Nov 2024 16:29:31 -0800

Add backwards compatibility for average changes

Diffstat:
Msrc/index.js | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/index.js b/src/index.js @@ -165,9 +165,13 @@ function detectTimeQuery(urlSearchParams) { } function detectAggregateQuery(urlSearchParams) { - const validOperations = ['none', 'daily_mean']; + const validOperations = ['none', 'daily_mean', 'avg']; if (validOperations.includes(urlSearchParams.get('aggregate').toLowerCase())) { currentAggregateSelection = urlSearchParams.get('aggregate').toLowerCase(); + // For backwards compatibility + if (currentAggregateSelection === 'daily_mean') { + currentAggregateSelection = 'avg'; + } let aggregateDDL = document.getElementById('aggregate'); for (let i = 0; i < aggregateDDL.options.length; i++) { if (aggregateDDL.options[i].value === currentAggregateSelection) {