Fix modifier sections not looking correct when the topmost section isn't visible

This commit is contained in:
thepaperpilot 2022-08-22 08:43:15 -05:00
parent 6784fbaf51
commit 8bd51932d9

View file

@ -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 : <br />}
{hasPreviousSection ? <br /> : null}
<div>
{header}
<br />