Commit fa698025 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'lm-replace-underscore-lodash-issues-show' into 'master'

Removes underscore from issues_show

See merge request gitlab-org/gitlab!25562
parents ee5a7745 aadb1cdc
import _ from 'underscore';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import updateDescription from '../utils/update_description'; import updateDescription from '../utils/update_description';
...@@ -26,7 +25,7 @@ export default class Store { ...@@ -26,7 +25,7 @@ export default class Store {
'.detail-page-description.content-block', '.detail-page-description.content-block',
); );
const details = const details =
!_.isNull(descriptionSection) && descriptionSection.getElementsByTagName('details'); descriptionSection != null && descriptionSection.getElementsByTagName('details');
this.state.descriptionHtml = updateDescription(data.description, details); this.state.descriptionHtml = updateDescription(data.description, details);
this.state.titleHtml = data.title; this.state.titleHtml = data.title;
......
import _ from 'underscore';
/** /**
* Function that replaces the open attribute for the <details> element. * Function that replaces the open attribute for the <details> element.
* *
...@@ -10,7 +8,7 @@ import _ from 'underscore'; ...@@ -10,7 +8,7 @@ import _ from 'underscore';
const updateDescription = (descriptionHtml = '', details) => { const updateDescription = (descriptionHtml = '', details) => {
let detailNodes = details; let detailNodes = details;
if (_.isEmpty(details)) { if (!details.length) {
detailNodes = []; detailNodes = [];
} }
......
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