@abp/ng.core 5.1.3 → 5.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -350,16 +350,18 @@ class RestService {
350
350
  .pipe(catchError(err => (skipHandleError ? throwError(err) : this.handleError(err))));
351
351
  }
352
352
  getParams(params, encoder) {
353
- const httpParams = encoder ? new HttpParams({ encoder }) : new HttpParams();
354
- return Object.keys(params).reduce((acc, key) => {
353
+ const filteredParams = Object.keys(params).reduce((acc, key) => {
355
354
  const value = params[key];
356
355
  if (isUndefinedOrEmptyString(value))
357
356
  return acc;
358
357
  if (value === null && !this.options.sendNullsAsQueryParam)
359
358
  return acc;
360
- acc = acc.set(key, value);
359
+ acc[key] = value;
361
360
  return acc;
362
- }, httpParams);
361
+ }, {});
362
+ return encoder
363
+ ? new HttpParams({ encoder, fromObject: filteredParams })
364
+ : new HttpParams({ fromObject: filteredParams });
363
365
  }
364
366
  }
365
367
  RestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RestService, deps: [{ token: CORE_OPTIONS }, { token: i1.HttpClient }, { token: EnvironmentService }, { token: HttpErrorReporterService }], target: i0.ɵɵFactoryTarget.Injectable });