| 80 | }) |
| 81 | |
| 82 | const onLoaded = () => { |
| 83 | if (this.destroyed) { return } |
| 84 | if (this.level.get('description')) { this.levelDescription = marked(utils.i18n(this.level.attributes, 'description')).replace(/<img.*?>/, '') } |
| 85 | this.levelBanner = this.level.get('banner') |
| 86 | this.teams = teamDataFromLevel(this.level) |
| 87 | } |
| 88 | |
| 89 | if (this.level.loaded) { onLoaded() } else { this.level.once('sync', onLoaded) } |
| 90 | this.sessions = this.supermodel.loadCollection(new LevelSessionsCollection(this.levelID), 'your_sessions', { cache: false }).model |