ismx-nexo-node-app 0.4.64 → 0.4.65

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.
@@ -38,7 +38,7 @@ class RepositoryRest extends Repository_1.default {
38
38
  headers.set(header, (_e = (_d = request.headers) === null || _d === void 0 ? void 0 : _d[header]) !== null && _e !== void 0 ? _e : "");
39
39
  // Si el body especificado es un objeto, lo convierte a JSON.
40
40
  let body = request.body;
41
- if (request.body && typeof request.body !== 'string' && !Buffer.isBuffer(request.body)) {
41
+ if (request.body && typeof request.body !== 'string' && typeof Buffer !== 'undefined' && !Buffer.isBuffer(request.body)) {
42
42
  headers.set('Content-Type', 'application/json');
43
43
  body = JSON.stringify(request.body);
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.64",
3
+ "version": "0.4.65",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -47,7 +47,7 @@ export default class RepositoryRest<Body=any,Res=any> extends Repository
47
47
 
48
48
  // Si el body especificado es un objeto, lo convierte a JSON.
49
49
  let body: string | undefined = request.body as string;
50
- if (request.body && typeof request.body !== 'string' && !Buffer.isBuffer(request.body)) {
50
+ if (request.body && typeof request.body !== 'string' && typeof Buffer !== 'undefined' && !Buffer.isBuffer(request.body)) {
51
51
  headers.set('Content-Type', 'application/json');
52
52
  body = JSON.stringify(request.body);
53
53
  }