Skip to content

Commit

Permalink
Fix bug with filter options not extracting commodity symbol correctly
Browse files Browse the repository at this point in the history
This code is hacky and should be replace, but I'll get to that later.
  • Loading branch information
iaincollins committed Sep 7, 2024
1 parent 00019cd commit 8fb7c3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardent-www",
"version": "0.44.0",
"version": "0.44.1",
"description": "Ardent Industry",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion pages/commodity/[commodity-name]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default () => {
}, [router.pathname])

async function getImportsAndExports(arg) {
const commodityName = window.location?.pathname?.replace(/.*\//, '')
const commodityName = router.query?.['commodity-name'] ?? window.location?.pathname?.replace(/\/(importers|exporters)$/, '').replace(/.*\//, '')
if (!commodityName) return
setUpdating(true)

Expand Down

0 comments on commit 8fb7c3d

Please sign in to comment.