fix: NaN library components are out of sync [FC-0083] (#1864)

This commit is contained in:
Jillian
2025-04-26 00:38:33 +09:30
committed by GitHub
parent 855b44f745
commit b30a1c8c5e
2 changed files with 1 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ export const OutOfSyncAlert: React.FC<OutOfSyncAlertProps> = ({
}) => {
const intl = useIntl();
const { data, isLoading } = useEntityLinksSummaryByDownstreamContext(courseId);
const outOfSyncCount = data?.reduce((count, lib) => count + lib.readyToSyncCount, 0);
const outOfSyncCount = data?.reduce((count, lib) => count + (lib.readyToSyncCount || 0), 0);
const alertKey = `outOfSyncCountAlert-${courseId}`;
useEffect(() => {

View File

@@ -14,7 +14,6 @@
{
"upstreamContextTitle": "CS problems",
"upstreamContextKey": "lib:OpenedX:CSPROB",
"readyToSyncCount": 0,
"totalCount": 3
}
]