Skip to content

Commit b4bec16

Browse files
committed
Fix an issue in the skill label colors
1 parent 065c3a0 commit b4bec16

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

webpack/js/hydration.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
export const hydrateAppWithData = (skills, labels) => {
2-
skills = Array.from( // Convert back into an array
3-
new Set( // Remove duplicates
4-
Object.values(skills)
5-
.flat() // Combine all skills
6-
.map(skill => skill.split('/')[0]) // Keep only the prefix
7-
)
2+
skills = Array.from(
3+
new Set( // Remove duplicates
4+
Object.values(skills).flat() // Combine all skills
5+
)
6+
)
7+
const top_level_skills = Array.from(
8+
new Set( // Remove duplicates
9+
skills.map(skill => skill.split('/')[0]) // Keep only the prefix
10+
)
811
)
912

1013
const categories = {}
@@ -35,5 +38,5 @@ export const hydrateAppWithData = (skills, labels) => {
3538
categories[name] = 'skill'
3639
})
3740

38-
return [skills, categories]
41+
return [top_level_skills, categories]
3942
}

0 commit comments

Comments
 (0)