diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 12:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 12:09:13 +0300 |
commit | 1ac794623a8be5dee111716a44dd04ff708f3541 (patch) | |
tree | 6c18f9fbe0bd9978bd3e8d9b083d3a0ca180686e /app/assets/javascripts/issue_show | |
parent | 5247fe0bef72fa922841a79d5dbefb47d95112fa (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issue_show')
-rw-r--r-- | app/assets/javascripts/issue_show/stores/index.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/issue_show/utils/update_description.js | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/issue_show/stores/index.js b/app/assets/javascripts/issue_show/stores/index.js index 688ba7b268d..0cd094243b9 100644 --- a/app/assets/javascripts/issue_show/stores/index.js +++ b/app/assets/javascripts/issue_show/stores/index.js @@ -1,4 +1,3 @@ -import _ from 'underscore'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import updateDescription from '../utils/update_description'; @@ -26,7 +25,7 @@ export default class Store { '.detail-page-description.content-block', ); const details = - !_.isNull(descriptionSection) && descriptionSection.getElementsByTagName('details'); + descriptionSection != null && descriptionSection.getElementsByTagName('details'); this.state.descriptionHtml = updateDescription(data.description, details); this.state.titleHtml = data.title; diff --git a/app/assets/javascripts/issue_show/utils/update_description.js b/app/assets/javascripts/issue_show/utils/update_description.js index 315f6c23b02..c5811290e61 100644 --- a/app/assets/javascripts/issue_show/utils/update_description.js +++ b/app/assets/javascripts/issue_show/utils/update_description.js @@ -1,5 +1,3 @@ -import _ from 'underscore'; - /** * Function that replaces the open attribute for the <details> element. * @@ -10,7 +8,7 @@ import _ from 'underscore'; const updateDescription = (descriptionHtml = '', details) => { let detailNodes = details; - if (_.isEmpty(details)) { + if (!details.length) { detailNodes = []; } |