Fix out of range issue

This commit is contained in:
laurenspriem
2025-06-05 14:35:03 +05:30
parent 496691d236
commit a99cdbedc4

View File

@@ -738,7 +738,7 @@ class SmartMemoriesService {
'Something is going wrong, ${potentialMemory.peopleMemoryType} has multiple memories for same person',
);
} else {
final randIdx = Random().nextInt(potentialMemory.memories.length);
final randIdx = Random().nextInt(memoriesForCategory.length);
potentialMemory = memoriesForCategory[randIdx];
}
}