Skip to content

Commit

Permalink
fix: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
psteinroe committed Jul 14, 2024
1 parent 539020b commit 40ba34d
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions packages/postgrest-core/src/postgrest-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PostgrestFilter<Result extends Record<string, unknown>> {
private _selectFn: FilterFn<Result> | undefined;
private _filtersFn: FilterFn<Result> | undefined;
private _filterPaths: Path[];
private _hasWildcardPath: boolean | undefined;
public hasWildcardPath: boolean | undefined;

constructor(
public readonly params: { filters: FilterDefinitions; paths: Path[] },
Expand All @@ -34,7 +34,7 @@ export class PostgrestFilter<Result extends Record<string, unknown>> {
this.params.filters,
this.params.paths,
);
this._hasWildcardPath = this.params.paths.some((p) =>
this.hasWildcardPath = this.params.paths.some((p) =>
p.declaration.endsWith('*'),
);
}
Expand Down Expand Up @@ -84,16 +84,6 @@ export class PostgrestFilter<Result extends Record<string, unknown>> {
return this._filtersFn(obj);
}

get hasWildcardPath(): boolean {
if (typeof this._hasWildcardPath === 'undefined') {
this._hasWildcardPath = this.params.paths.some((p) =>
p.declaration.endsWith('*'),
);
}

return this._hasWildcardPath;
}

hasFiltersOnPaths(paths: string[]): boolean {
return (
filterFilterDefinitionsByPaths(this.params.filters, paths).length > 0
Expand Down

0 comments on commit 40ba34d

Please sign in to comment.