Skip to content

Commit

Permalink
Simplify offset and limit value extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jkaster committed Jul 1, 2021
1 parent 7b791b6 commit 4286ec7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/sdk-rtl/src/paging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,7 @@ export class Paging<TSuccess extends ILength, TError>
}

parse(raw: IRawResponse): IPager<TSuccess, TError> {
// Default the base so relative paths are initialized correctly
const req = new URL(raw.url, 'https://localhost')
const params = req.searchParams
const params = new URLSearchParams(raw.url)
this.limit = Paging.paramDefault(params.get('limit'), -1)
this.offset = Paging.paramDefault(
params.get('offset'),
Expand Down

0 comments on commit 4286ec7

Please sign in to comment.