Skip to content

Commit

Permalink
fix query-params interceptor for objects
Browse files Browse the repository at this point in the history
  • Loading branch information
olzraiti committed Dec 17, 2024
1 parent 3b21c53 commit 8537094
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/interceptors/query-params/query-params.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ export function createQueryParamsInterceptor<T extends (Partial<QueryWithLangDto
jsonLdContext = result["@context"];
}
}
const { length } = result;
if (isQueryWithPagingDto(query)) {
result = paginateArray(result, page, pageSize, lang);
}
if (isQueryWithLangDto(query) && length) {
if (isQueryWithLangDto(query)) {
if (!jsonLdContext) {
throw new Error("QueryParamsInterceptor failed to get the @context for item");
}
Expand Down

0 comments on commit 8537094

Please sign in to comment.