diff --git a/modules/issue_tracker/jsx/attachments/attachmentsList.js b/modules/issue_tracker/jsx/attachments/attachmentsList.js index f33652b573f..931ee3cc251 100644 --- a/modules/issue_tracker/jsx/attachments/attachmentsList.js +++ b/modules/issue_tracker/jsx/attachments/attachmentsList.js @@ -149,6 +149,15 @@ class AttachmentsList extends Component { ); } + /** + * Sets event target src to null + * + * @param {Object} event + */ + displayNone(event) { + event.target.src = null; + } + /** * Renders the React component. * @@ -185,6 +194,7 @@ class AttachmentsList extends Component { ); let attachmentsRows = []; + let regexImg = /image/; for (const key in this.state.attachments) { if (this.state.attachments.hasOwnProperty(key)) { const item = this.state.attachments[key]; @@ -203,7 +213,26 @@ class AttachmentsList extends Component {