Skip to content

Commit ddeca84

Browse files
committed
fix: Unable to parse patch options
1 parent bc8e19e commit ddeca84

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/routes/patches/PatchItem.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
88
export let patch: Patch;
99
export let showAllVersions: boolean;
10-
const hasPatchOptions = !!patch.options?.length;
1110
let expanded: boolean = false;
11+
12+
const options = Object.entries(patch.options).map(([optionKey, option]) => ({
13+
optionKey,
14+
...option
15+
}));
16+
const hasPatchOptions = options.length > 0;
1217
</script>
1318

1419
<!-- svelte-ignore a11y-click-events-have-key-events -->
@@ -83,7 +88,7 @@
8388
{#if expanded && hasPatchOptions}
8489
<span transition:fade={{ easing: quintOut, duration: 1000 }}>
8590
<div class="options" transition:slide={{ easing: quintOut, duration: 500 }}>
86-
{#each patch.options as option}
91+
{#each options as option}
8792
<div class="option">
8893
<h5 id="option-title">{option.title}</h5>
8994
<h5>

0 commit comments

Comments
 (0)