ngx-restangular
ngx-restangular copied to clipboard
The bug in defaultResponseInterceptor
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 || {};
};