diff options
author | Kushal Pandya <kushal@gitlab.com> | 2018-04-05 13:56:15 +0530 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2018-04-06 14:26:39 +0530 |
commit | 15195f67840cd5369d776938b62b02aa939a4270 (patch) | |
tree | 1942bfb72295c05f9b61b2520165d32ae7be57b4 | |
parent | 388f43b6111bf35561988d327c462ab75afc34f6 (diff) | |
download | gitlab-ce-15195f67840cd5369d776938b62b02aa939a4270.tar.gz |
Use noteable type map from constants
-rw-r--r-- | app/assets/javascripts/notes/mixins/noteable.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/assets/javascripts/notes/mixins/noteable.js b/app/assets/javascripts/notes/mixins/noteable.js index 5bf8216a1f3..b68543d71c8 100644 --- a/app/assets/javascripts/notes/mixins/noteable.js +++ b/app/assets/javascripts/notes/mixins/noteable.js @@ -9,16 +9,7 @@ export default { }, computed: { noteableType() { - switch (this.note.noteable_type) { - case 'MergeRequest': - return constants.MERGE_REQUEST_NOTEABLE_TYPE; - case 'Issue': - return constants.ISSUE_NOTEABLE_TYPE; - case 'Epic': - return constants.EPIC_NOTEABLE_TYPE; - default: - return ''; - } + return constants.NOTEABLE_TYPE_MAPPING[this.note.noteable_type]; }, }, }; |