@placeos/ts-client 4.2.4 → 4.2.5

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.2.4",
2
+ "version": "4.2.5",
3
3
  "license": "MIT",
4
4
  "name": "@placeos/ts-client",
5
5
  "author": "Alex Sorafumo <alex@place.tech>",
@@ -272,9 +272,7 @@ export function request(
272
272
  ): Observable<HttpResponse> {
273
273
  if (is_mock()) {
274
274
  const request_obs = mock_handler(method, url, options?.body);
275
- if (request_obs) {
276
- return request_obs;
277
- }
275
+ if (request_obs) return request_obs;
278
276
  }
279
277
  options.headers = options.headers || {};
280
278
  if (!options.headers['Content-Type'] && !options.headers['content-type']) {
package/src/http/mock.ts CHANGED
@@ -92,6 +92,9 @@ export function mockRequest(
92
92
  body?: any,
93
93
  handler_map: HashMap<MockHttpRequestHandler> = _handlers,
94
94
  ): Observable<HashMap | string | void> | null {
95
+ if (window.debug) {
96
+ console.log('Resolving request:', method, url, body);
97
+ }
95
98
  const handler = findRequestHandler(method, url, handler_map);
96
99
  if (handler) {
97
100
  const request = processRequest(url, handler, body);