From 8bd51932d9e10b121441353076652cb22c20b59f Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Mon, 22 Aug 2022 08:43:15 -0500 Subject: [PATCH] Fix modifier sections not looking correct when the topmost section isn't visible --- src/data/common.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/common.tsx b/src/data/common.tsx index c9da34e..d3eda18 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -283,6 +283,7 @@ export function createCollapsibleModifierSections( const jsxFunc = jsx(() => { const sections = calculateSections(); + let firstVisibleSection = true; const sectionJSX = sections.map((s, i) => { if (unref(processed.visible[i]) === false) return null; const header = ( @@ -315,9 +316,12 @@ export function createCollapsibleModifierSections( ); + const hasPreviousSection = !firstVisibleSection; + firstVisibleSection = false; + return ( <> - {i === 0 ? null :
} + {hasPreviousSection ?
: null}
{header}