Skip to content

Commit

Permalink
chore(ng-query): release version 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBasal committed Oct 30, 2023
1 parent a10f4a0 commit 8cf64f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 9 additions & 0 deletions packages/ng-query/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [1.0.3](https://github-personal/ngneat/query/compare/ng-query-1.0.2...ng-query-1.0.3) (2023-10-30)


### Bug Fixes

* **query:** 🐞 assign data ([a10f4a0](https://github-personal/ngneat/query/commit/a10f4a057fd1e5a11ed08a3581048e7ad57b42eb))



## [1.0.2](https://github-personal/ngneat/query/compare/ng-query-1.0.1...ng-query-1.0.2) (2023-10-30)


Expand Down
2 changes: 1 addition & 1 deletion packages/ng-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngneat/query",
"version": "1.0.2",
"version": "1.0.3",
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Angular",
"license": "MIT",
"repository": "ngneat/query",
Expand Down
4 changes: 1 addition & 3 deletions packages/ng-query/src/lib/operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ export function mapResultsData<T extends QueryObserverResult[], R>(
mapFn: (data: ReturnTypes<T>) => R
): OperatorFunction<T, QueryObserverResult<R>> {
return map((result) => {
let data;

const mappedResult = {
isLoading: someRequestsStatusOf(result, 'loading'),
isSuccess: allRequestsStatusOf(result, 'success'),
isFetching: result.some((r) => r.isFetching),
isError: someRequestsStatusOf(result, 'error'),
error: result.find((r) => r.isError)?.error,
data,
data: undefined,
} as QueryObserverResult<R>;

if (mappedResult.isSuccess) {
Expand Down

0 comments on commit 8cf64f1

Please sign in to comment.