chore: make ES6 compliant

This commit is contained in:
Phil Thomas
2025-04-23 20:08:57 +02:00
parent 0b5ac7fe15
commit 537263f884

View File

@@ -44,8 +44,8 @@ export class BaseService {
// If JSON format is preferred, key must be provided.
if (key != null) {
return isDeep
? Object.entries(value as Record<string, any>).reduce(
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
? Object.keys(value as Record<string, any>).reduce(
(hp, k) => hp.append(`${key}[${k}]`, value[k]),
httpParams,
)
: httpParams.append(key, JSON.stringify(value));