feat: fixes

This commit is contained in:
2025-12-10 10:29:27 +01:00
parent 1ead7d2dec
commit 02579b65f9
5 changed files with 34 additions and 11 deletions
+10
View File
@@ -352,6 +352,16 @@ export const sanitizeStructureList = (structure = [], options = {}) => {
result.unshift(intro);
}
const outroIndex = result.findIndex((item) => {
const meta = getSegmentMeta(item);
return meta?.exclusiveGroup === "outro";
});
if (outroIndex !== -1 && outroIndex < result.length - 1) {
const [outro] = result.splice(outroIndex, 1);
result.push(outro);
}
return result;
};