const sanitize = (name) => {
  return name
    .replace(':', '')
}

export default {
  set (state, { key, value }) {
    state.info[sanitize(key)] = value
  },
  addEps (state, { name, data }) {
    state.info[name].episodesInfo = data
  },
  addEpsLinks (state, { name, data }) {
    state.info[name].episodesLinks = data
  },
  showModal (state, bool) {
    state.modal.show = bool
  },
  setTerm (state, value) {
    state.modal.term = value
  },
  setRemote (state, bool) {
    state.modal.isRemote = bool
  }
}

const sanitize = (name) => {
  return name
    .replace(':', '')
}

export default {
  set (state, { key, value }) {
    state.info[sanitize(key)] = value
  },
  addEps (state, { name, data }) {
    state.info[sanitize(name)].episodesInfo = data
  },
  addEpsLinks (state, { name, data }) {
    state.info[name].episodesLinks = data
  },
  showModal (state, bool) {
    state.modal.show = bool
  },
  setTerm (state, value) {
    state.modal.term = value
  },
  setRemote (state, bool) {
    state.modal.isRemote = bool
  }
}

Fix bug where info name was not sanitzed before comitting
Fix bug where info name was not sanitzed before comitting
