# Ignore Empty Conditions

{% hint style="warning" %}

## Project Toolchain Usage

This feature makes use of these Project Toolchain APIs: **Middleware**, **Extensions**. Because of this usage, it defines the following modules:

### ignoreEmptyConditions

This module defines the following middleware and extensions identifiers that can be imported via Project Toolchain, along with their descriptions:

* **removeEmptyOrBlock** - Remove empty OR blocks from queries.
  {% endhint %}

To enable this optional feature, add the `ignoreEmptyConditions` element to your [optionalFeatures](https://prisma-util.gitbook.io/stable/api-documentation/configuration-reference/optional-features) array, then use the generated middleware or extension inside of your code.

## Feature Effect

### Query Input

For this example, we'll pass the following input to an operation on a model:

{% code title="Test Input" %}

```typescript
{
    where: {
        id: 2,
        OR: [],
        posts: {
            every: {
                OR: [{ id: 2 }, { id: 3 }]
            }
        }
    }
}
```

{% endcode %}

### Query Result

The input above will be manipulated and Prisma will receive this input:

{% code title="Test Output" %}

```typescript
{
    where: {
        id: 2,
        posts: {
            every: {
                OR: [{ id: 2 }, { id: 3 }]
            }
        }
    }
}
```

{% endcode %}
