<commit_before>import _ from 'lodash';

import { mapGetters } from 'vuex';

export default {
  data() {
    return {
      classesLoading: false,
      classLoadError: ''
    };
  },
  computed: {
    ...mapGetters(['eventClasses'])
  },
  methods: {
    sizeInfoForOffering(eventId, offeringId) {
      const classes = this.classesForEvent(eventId);
      return _.find(classes, { offering_id: offeringId }).sizeInfo;
    },
    classesForEvent(eventId) {
      return this.eventClasses[eventId] || [];
    },
    hasClassInfoForEvent(eventId) {
      const classes = this.classesForEvent(eventId);<commit_msg>Protect against not finding class<commit_after>import _ from 'lodash';

import { mapGetters } from 'vuex';

export default {
  data() {
    return {
      classesLoading: false,
      classLoadError: ''
    };
  },
  computed: {
    ...mapGetters(['eventClasses'])
  },
  methods: {
    sizeInfoForOffering(eventId, offeringId) {
      const classes = this.classesForEvent(eventId);
      const classInfo = _.find(classes, { offering_id: offeringId }) || {};
      return classInfo.sizeInfo;
    },
    classesForEvent(eventId) {
      return this.eventClasses[eventId] || [];
    },
    hasClassInfoForEvent(eventId) {
      const classes = this.classesForEvent(eventId);
{'fraction_non_alphanumeric': 0.1309431021044427, 'fraction_numerical': 0.0, 'mean_word_length': 3.237623762376238, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2111350', 'n_tokens_mistral': 395, 'n_tokens_neox': 394, 'n_words': 73}