adapt-authoring-ui 1.8.2 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,7 +123,11 @@ define(function(require){
123
123
  creatorName = Origin.l10n.t('app.unknownuser');
124
124
  }
125
125
  if(this._isShared && creatorName) model.set('creatorName', creatorName);
126
- model.set('tagTitles', model.get('tags').map(tId => this.allTags.find(t => t.get('_id') === tId).get('title')));
126
+ model.set('tagTitles', (model.get('tags') || []).reduce((titles, tId) => {
127
+ const tag = this.allTags.find(t => t.get('_id') === tId);
128
+ tag ? titles.push(tag.get('title')) : console.error(`Missing tag '${tId}' on course ${model.get('_id')}`);
129
+ return titles;
130
+ }, []));
127
131
  const view = new ProjectView({ model });
128
132
  this.childViews.push(view);
129
133
  this.getProjectsContainer().append(view.$el);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-ui",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Front-end application for the Adapt authoring tool",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-ui",
6
6
  "license": "GPL-3.0",