Skip to content

Commit 80dd230

Browse files
committed
fix: always provide a valid platform and league
1 parent 16a4697 commit 80dd230

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

frontend/src/lib/skill_tree.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,14 @@ export const openTrade = (
474474
platform: string,
475475
league: string
476476
) => {
477+
if (!platform || typeof platform !== 'string') {
478+
platform = 'PC';
479+
}
480+
481+
if (!league || typeof league !== 'string') {
482+
league = 'Standard';
483+
}
484+
477485
const url = new URL(
478486
`https://www.pathofexile.com/trade/search${platform === 'PC' ? '' : `/${platform.toLowerCase()}`}/${league}`
479487
);

frontend/src/routes/tree/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@
458458
};
459459
460460
$: league && localStorage.setItem('league', league.value);
461-
$: console.log(league);
462461
463462
onMount(() => {
464463
getLeagues();

0 commit comments

Comments
 (0)