fix(ci): keep the photo picker within lint limits

Pass through the optional sheet coverage state and narrow the pending photo group before accessing it. Lower the test ratchet after removing a non-null assertion.
This commit is contained in:
Maurice
2026-11-30 23:13:53 +01:00
parent 114086f6e2
commit 8335ac45f9
3 changed files with 6 additions and 6 deletions
@@ -186,11 +186,11 @@ export function useJourneyEntryForm({
const next = [...previous];
for (const group of groups) {
const index = next.findIndex((pick) => pick.provider === provider && pick.passphrase === group.passphrase);
if (index < 0) {
const existing = next[index];
if (!existing) {
next.push({ ...group, provider });
continue;
}
const existing = next[index]!;
const assets = new Map(existing.assetIds.map((id, i) => [id, existing.mediaTypes?.[i] ?? 'image']));
group.assetIds.forEach((id, i) => {
if (!assets.has(id)) assets.set(id, group.mediaTypes?.[i] ?? 'image');