Commit 3a1fe600 by Madhan Neethiraj Committed by Suma Shivaprasad

ATLAS-932: UI: 'create tag' button does not work - when there are no tags in the store

parent 014abba5
......@@ -57,7 +57,7 @@ define(['require',
*/
initialize: function(options) {
_.extend(this, _.pick(options, 'tagCollection', 'tag', 'termCollection', 'descriptionData'));
if (this.tagCollection && this.tagCollection.first().get('traitTypes')) {
if (this.tagCollection && this.tagCollection.length > 0 && this.tagCollection.first().get('traitTypes')) {
this.description = this.tagCollection.first().get('traitTypes')[0].typeDescription;
} else if (this.termCollection) {
this.description = this.descriptionData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment