Skip to content

Commit ff1b485

Browse files
committed
OpenConceptLab/ocl_issues#2300 | loading CIEL latest mapped sources in the starting
1 parent 46f4d1c commit ff1b485

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/map-projects/MapProject.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ const MapProject = () => {
255255
service.appendToUrl('/match-algorithms/');
256256

257257
const response = await service.get();
258-
setApiAlgos(response?.data?.results || []);
258+
const _algos = response?.data?.results || []
259+
setApiAlgos(_algos);
260+
if(find(_algos, {type: 'ocl-ciel-bridge'}))
261+
fetchMappedSources('/orgs/CIEL/sources/CIEL/latest/', setCIELMappedSources)
259262
} catch {
260263
// pass
261264
}
@@ -945,8 +948,6 @@ const MapProject = () => {
945948
if(version?.version_url) {
946949
fetchLocaleDistribution(version.version_url)
947950
fetchMappedSources(version.version_url, setMappedSources)
948-
if(isEmpty(CIELMappedSources))
949-
fetchMappedSources('/orgs/CIEL/sources/CIEL/latest/', setCIELMappedSources)
950951
updateAlgosByRepoVersion(version)
951952
}
952953
}

0 commit comments

Comments
 (0)