Skip to content

Commit

Permalink
fix extra quotations bricking route fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Nov 17, 2024
1 parent 521f562 commit 81b5df4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/RouteScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
}
let url = new URL(
`https://birch.catenarymaps.org/route_info?chateau=${routestack.chateau_id}&route_id=${encodeURIComponent(routestack.route_id)}`
`https://birch.catenarymaps.org/route_info?chateau=${routestack.chateau_id}&route_id=${encodeURIComponent(routestack.route_id.replace(/^\"/, "").replace(/\"$/, ""))}`
);
await fetch(url.toString()).then(async (response) => {
Expand Down
19 changes: 18 additions & 1 deletion src/components/sidebarInternals.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,24 @@
});
}}
>

{
#if show_gtfs_ids_store
}
<p>
<span class="font-mono text-xs dark:text-gray-400 text-gray-500"
>{option.data.chateau_id}</span
>
{
#if option.data.route_id

}
<span class="font-mono text-xs dark:text-gray-400 text-gray-500 ml-1 font-semibold"
>{option.data.route_id}</span
>


{/if}</p>
{/if}
{#if option.data.name}
<span
style={`color: ${darkMode ? lightenColour(option.data.colour) : option.data.colour}`}
Expand Down

0 comments on commit 81b5df4

Please sign in to comment.