Skip to content

Commit

Permalink
Declare variables
Browse files Browse the repository at this point in the history
  • Loading branch information
its-miroma committed May 31, 2024
1 parent 6307297 commit 6c44ca8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions scripts/src/lib/Documentation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
getLoaderVersions,
} from "./Api";
let anchor;
let url;
function handleSelectChange(event: any, project: any) {
const selectedVersion = event.target.value;
Expand Down Expand Up @@ -87,14 +90,14 @@
{:then data}
{#each data as project}
<div class="javadoc-selector">
<select value="Select {project.name} Version" on:change={(event) => handleSelectChange(event, project)}>
<option>Select {project.name} Version</option>
{#each project.versions as version}
<option value={version}>{version}</option>
{/each}
</select>
<a bind:this={anchor} href={url} target="_blank">
</div>
<select value="Select {project.name} Version" on:change={(event) => handleSelectChange(event, project)}>
<option>Select {project.name} Version</option>
{#each project.versions as version}
<option value={version}>{version}</option>
{/each}
</select>
<a bind:this={anchor} href={url} target="_blank">
</div>
{/each}
{:catch error}
<p style="color: red">Error: {error.message}</p>
Expand Down

0 comments on commit 6c44ca8

Please sign in to comment.