MCPcopy Create free account
hub / github.com/codecombat/codecombat / getCurrentCourse

Function getCurrentCourse

ozaria/site/store/BaseCurriculumGuide.js:51–58  ·  view source on GitHub ↗
(_state, getters, _rootState, rootGetters)

Source from the content-addressed store, hash-verified

49 },
50
51 getCurrentCourse (_state, getters, _rootState, rootGetters) {
52 if (!getters.selectedChapterId || !rootGetters['courses/sorted']) {
53 return
54 }
55
56 const courses = rootGetters['courses/sorted']
57 return courses.find(({ campaignID }) => campaignID === getters.selectedChapterId)
58 },
59
60 getCapstoneInfo (_state, getters, _rootState, rootGetters) {
61 const gameContent = rootGetters['gameContent/getContentForCampaign'](getters.selectedChapterId)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected