ywana-core8 0.0.372 → 0.0.373

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,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.372",
3
+ "version": "0.0.373",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -5,12 +5,11 @@ async function fetchAsync(method, URL, body = null, token, headers) {
5
5
  const request = {
6
6
  method,
7
7
  mode: 'cors',
8
- headers: {
8
+ headers: Object.assign({
9
9
  "Accept": "application/json",
10
10
  "Content-Type": "application/json",
11
11
  "x-access-token": token,
12
- ...headers
13
- },
12
+ }, headers),
14
13
  body
15
14
  }
16
15
 
@@ -22,7 +21,7 @@ async function fetchAsync(method, URL, body = null, token, headers) {
22
21
  }
23
22
  throw response
24
23
  } catch (error) {
25
- if (error instanceof Error) { throw { error }}
24
+ if (error instanceof Error) { throw { error } }
26
25
  const json = await error.json()
27
26
  throw {
28
27
  success: false,