Use noteable type map from constants
This commit is contained in:
parent
388f43b611
commit
15195f6784
|
@ -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];
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue