message: Ensure config is loaded before challenge retrieval and sorting
diff: @@ -75,13 +75,6 @@ export class ScoreBoardComponent implements OnInit {
  this.appName = config.application.name
  this.restrictToTutorialsFirst = config.challenges.restrictToTutorialsFirst
  this.showOnlyTutorialChallenges = localStorage.getItem('showOnlyTutorialChallenges') ? JSON.parse(String(localStorage.getItem('showOnlyTutorialChallenges'))) : this.restrictToTutorialsFirst
  - if (this.showOnlyTutorialChallenges) {
  - this.challenges.sort((a, b) => {
  - return a.tutorialOrder - b.tutorialOrder
  - })
  - }
  - }, (err) => console.log(err))
  -
  this.challengeService.find({ sort: 'name' }).subscribe((challenges) => {
  this.challenges = challenges
  for (let i = 0; i < this.challenges.length; i++) {
  @@ -109,11 +102,18 @@ export class ScoreBoardComponent implements OnInit {
  this.toggledMajorityOfDifficulties = this.determineToggledMajorityOfDifficulties()
  this.toggledMajorityOfCategories = this.determineToggledMajorityOfCategories()
  + if (this.showOnlyTutorialChallenges) {
  + this.challenges.sort((a, b) => {
  + return a.tutorialOrder - b.tutorialOrder
  + })
  + }
  +
  this.spinner.hide()
  }, (err) => {
  this.challenges = []
  console.log(err)
  })
  + }, (err) => console.log(err))
  this.ngZone.runOutsideAngular(() => {
  this.io.socket().on('challenge solved', (data: any) => {
  