message: fix(store): Lowercase extensions before comparing
diff: @@ -369,34 +369,39 @@ const storeReducer = (state = DEFAULT_STATE, action) => {
  })
  }
  - if (_.some([
  - !_.isString(action.data.extension),
  - !_.includes(supportedFormats.getAllExtensions(), action.data.extension)
  - ])) {
  + if (!_.isString(action.data.extension)) {
  throw errors.createError({
  title: `Invalid image extension: ${action.data.extension}`
  })
  }
  - const lastImageExtension = fileExtensions.getLastFileExtension(action.data.path)
  + const extension = _.toLower(action.data.extension)
  - if (lastImageExtension !== action.data.extension) {
  - if (!action.data.archiveExtension) {
  + if (!_.includes(supportedFormats.getAllExtensions(), extension)) {
  + throw errors.createError({
  + title: `Invalid image extension: ${action.data.extension}`
  + })
  + }
  +
  + let lastImageExtension = fileExtensions.getLastFileExtension(action.data.path)
  + lastImageExtension = _.isString(lastImageExtension) ? _.toLower(lastImageExtension) : lastImageExtension
  +
  + if (lastImageExtension !== extension) {
  + if (!_.isString(action.data.archiveExtension)) {
  throw errors.createError({
  title: 'Missing image archive extension'
  })
  }
  - if (_.some([
  - !_.isString(action.data.archiveExtension),
  - !_.includes(supportedFormats.getAllExtensions(), action.data.archiveExtension)
  - ])) {
  + const archiveExtension = _.toLower(action.data.archiveExtension)
  +
  + if (!_.includes(supportedFormats.getAllExtensions(), archiveExtension)) {
  throw errors.createError({
  title: `Invalid image archive extension: ${action.data.archiveExtension}`
  })
  }
  - if (lastImageExtension !== action.data.archiveExtension) {
  + if (lastImageExtension !== archiveExtension) {
  throw errors.createError({
  title: `Image archive extension mismatch: ${action.data.archiveExtension} and ${lastImageExtension}`
  })
  