From ddeca8496698f8178bdd391615ff7d7c8d201237 Mon Sep 17 00:00:00 2001 From: Ushie Date: Fri, 16 Aug 2024 02:32:01 +0300 Subject: [PATCH] fix: Unable to parse patch options --- src/routes/patches/PatchItem.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/routes/patches/PatchItem.svelte b/src/routes/patches/PatchItem.svelte index 0956129..5217ef2 100644 --- a/src/routes/patches/PatchItem.svelte +++ b/src/routes/patches/PatchItem.svelte @@ -7,8 +7,13 @@ export let patch: Patch; export let showAllVersions: boolean; - const hasPatchOptions = !!patch.options?.length; let expanded: boolean = false; + + const options = Object.entries(patch.options).map(([optionKey, option]) => ({ + optionKey, + ...option + })); + const hasPatchOptions = options.length > 0; @@ -83,7 +88,7 @@ {#if expanded && hasPatchOptions}
- {#each patch.options as option} + {#each options as option}
{option.title}