Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk committed Feb 13, 2025
1 parent f877bc3 commit e262990
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import {OrdersVersion} from './ordersVersion'
export function concatQueryParams<
T extends Record<string | number, string | string[] | number | boolean>
>(params: T, version: false | OrdersVersion = false): string {
const versionRequired = version && version !== OrdersVersion.all

if (!params) {
return version ? `?version=${version}` : ''
return versionRequired ? `?version=${version}` : ''
}

if (version) {
if (versionRequired) {
Object.assign(params, {version})
}

Expand Down

0 comments on commit e262990

Please sign in to comment.