export function resetErrorMessage() {
  return {
    type: 'RESET_ERROR_MESSAGE'
  }
}

export function resetErrorMessage() {
  return (dispatch, getState) => {
    const { errorMessage } = getState()

    if (typeof errorMessage === 'string') {
      dispatch({
        type: 'RESET_ERROR_MESSAGE'
      })
    }
  }
}

Check errorMessage state before resetting error message
Check errorMessage state before resetting error message
