Repository: incubator-atlas Updated Branches: refs/heads/master 014abba5e -> 3a1fe600f
ATLAS-932: UI: 'create tag' button does not work - when there are no tags in the store Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/3a1fe600 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/3a1fe600 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/3a1fe600 Branch: refs/heads/master Commit: 3a1fe600f770ae8d239f8a5a4ee21a881419bcf5 Parents: 014abba Author: Madhan Neethiraj <[email protected]> Authored: Tue Jun 21 16:11:49 2016 -0700 Committer: Suma Shivaprasad <[email protected]> Committed: Tue Jun 21 16:20:39 2016 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/views/tag/CreateTagLayoutView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3a1fe600/dashboardv2/public/js/views/tag/CreateTagLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/tag/CreateTagLayoutView.js b/dashboardv2/public/js/views/tag/CreateTagLayoutView.js index 3107894..2930ac3 100644 --- a/dashboardv2/public/js/views/tag/CreateTagLayoutView.js +++ b/dashboardv2/public/js/views/tag/CreateTagLayoutView.js @@ -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;
