Repository: incubator-atlas Updated Branches: refs/heads/0.7-incubating 83bccaa58 -> e421f1f5d
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/e421f1f5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/e421f1f5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/e421f1f5 Branch: refs/heads/0.7-incubating Commit: e421f1f5d56698582b7e20e4a431e45d1d9b461e Parents: 83bccaa Author: Madhan Neethiraj <[email protected]> Authored: Tue Jun 21 16:11:49 2016 -0700 Committer: Suma Shivaprasad <[email protected]> Committed: Tue Jun 21 16:21:20 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/e421f1f5/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;
