summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/issue_show/stores/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/issue_show/stores/index.js')
-rw-r--r--app/assets/javascripts/issue_show/stores/index.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/issue_show/stores/index.js b/app/assets/javascripts/issue_show/stores/index.js
index d32747b5053..688ba7b268d 100644
--- a/app/assets/javascripts/issue_show/stores/index.js
+++ b/app/assets/javascripts/issue_show/stores/index.js
@@ -1,4 +1,6 @@
+import _ from 'underscore';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
+import updateDescription from '../utils/update_description';
export default class Store {
constructor(initialState) {
@@ -19,8 +21,15 @@ export default class Store {
}
Object.assign(this.state, convertObjectPropsToCamelCase(data));
+ // find if there is an open details node inside of the issue description.
+ const descriptionSection = document.body.querySelector(
+ '.detail-page-description.content-block',
+ );
+ const details =
+ !_.isNull(descriptionSection) && descriptionSection.getElementsByTagName('details');
+
+ this.state.descriptionHtml = updateDescription(data.description, details);
this.state.titleHtml = data.title;
- this.state.descriptionHtml = data.description;
this.state.lock_version = data.lock_version;
}