mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 18:54:17 +00:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user