Skip to content

Commit

Permalink
Removes unnecessary clearing of query builder id.
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlange committed Feb 17, 2024
1 parent 0542c5a commit 3caf1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/QueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export class QueryBuilder<T extends BaseType = {}> implements QueryBuilderBase<T

private step(): this {
if (this.id) {
// if a query instance has already been created (i.e., the query is already in use), throw an error.
throw new Error('Modifying a resolved query will return inaccurate result sets.');
}

Expand All @@ -147,7 +148,6 @@ export class QueryBuilder<T extends BaseType = {}> implements QueryBuilderBase<T
}

this.state = { tag: null, ids: [] };
this.id = null;
return this;
}

Expand Down

0 comments on commit 3caf1e0

Please sign in to comment.