summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/mixins/noteable.js
blob: bf1cd6fe5a8a48dcb16228ddded8c9d2e54e2710 (plain)
1
2
3
4
5
6
7
8
9
10
import * as constants from '../constants';

export default {
  computed: {
    noteableType() {
      const note = this.discussion ? this.discussion.notes[0] : this.note;
      return constants.NOTEABLE_TYPE_MAPPING[note.noteable_type];
    },
  },
};