wowtoken.app

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

commit 30faf5523d952bdbeaf2a6f5fe867ba0f191deb6
parent f7d02e65722cd2b15373c08e80bce0cbb1d84332
Author: Emily Doherty <emily@emilyd.xyz>
Date:   Thu,  1 Jul 2021 20:39:28 -0400

Fix the broken ability to change region and time preferences

Diffstat:
Msrc/index.js | 4++--
Mwebpack.config.js | 3++-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/index.js b/src/index.js @@ -87,7 +87,7 @@ function updateRegionalToken(region, data) { } -function updateRegionPreference(newRegion) { +export function updateRegionPreference(newRegion) { if (newRegion != current_region_selection) { token_chart.destroy(); current_region_selection = newRegion; @@ -95,7 +95,7 @@ function updateRegionPreference(newRegion) { formatToken(); pullChartData().then(populateChart); } -function updateTimePreference(newTime) { +export function updateTimePreference(newTime) { if (newTime != current_time_selection) { token_chart.destroy(); current_time_selection = newTime; diff --git a/webpack.config.js b/webpack.config.js @@ -4,7 +4,8 @@ module.exports = { entry: './src/index.js', output: { filename: 'bundle.js', - path: path.resolve(__dirname, 'dist') + path: path.resolve(__dirname, 'dist'), + libraryTarget: 'window', }, module: { rules: [