ngx-restangular icon indicating copy to clipboard operation
ngx-restangular copied to clipboard

The bug in defaultResponseInterceptor

Open markb-trustifi opened this issue 2 years ago • 0 comments

When the response data is a boolean "false", numeric "0" or an empty string the restangular response returns it as an empty object.

https://github.com/2muchcoffeecom/ngx-restangular/blob/6407f48dd20c77d5a077ef5d666a896664db012b/projects/ngx-restangular/src/lib/ngx-restangular-config.factory.ts#L318

 configuration.defaultResponseInterceptor = function (data /*, operation, what, url, response, subject */) {
    return data || {};
  };

markb-trustifi avatar Dec 08 '22 06:12 markb-trustifi