Skip to content

Commit c017398

Browse files
refactor(shopify-assets): drop no-op distinctUntilChanged on search fetch
The fetch observable emits a single value, so distinctUntilChanged never filters anything. Co-authored-by: Pedro Bonamin <pedrobonamin@users.noreply.github.com>
1 parent c1b0a78 commit c017398

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • plugins/sanity-plugin-shopify-assets/src/datastores

‎plugins/sanity-plugin-shopify-assets/src/datastores/shopify.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {BehaviorSubject, Observable, concat} from 'rxjs'
22
import {fromFetch} from 'rxjs/fetch'
3-
import {debounceTime, distinctUntilChanged, switchMap, withLatestFrom} from 'rxjs/operators'
3+
import {debounceTime, switchMap, withLatestFrom} from 'rxjs/operators'
44

55
type SearchSubject = BehaviorSubject<string>
66
type CursorSubject = BehaviorSubject<any>
@@ -79,7 +79,7 @@ export const search = (props: fetchProps): Observable<any> => {
7979
cursor: c,
8080
resultsPerPage,
8181
token,
82-
}).pipe(distinctUntilChanged())
82+
})
8383
}
8484
return fetchList({projectId, dataset, shop, cursor: c, resultsPerPage, token})
8585
}),

0 commit comments

Comments
 (0)