Add handling of old roadmap images
This commit is contained in:
@@ -19,8 +19,11 @@ export const getRequestedRoadmap = req => {
|
||||
legacyUrlWithoutVersion,
|
||||
];
|
||||
|
||||
const foundRoadmap = roadmaps.find(roadmap => urlToSlugList.includes(roadmap.slug)) || {};
|
||||
|
||||
return {
|
||||
...roadmaps.find(roadmap => urlToSlugList.includes(roadmap.slug)),
|
||||
...foundRoadmap,
|
||||
version: foundVersion,
|
||||
picture: (foundRoadmap.picture || '').replace('{version}', foundVersion),
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user