@snapshot-labs/snapshot.js 0.11.14 → 0.11.16

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.
@@ -399,11 +399,14 @@ var Client = /** @class */ (function () {
399
399
  return [2 /*return*/, new Promise(function (resolve, reject) {
400
400
  fetch__default['default'](address, init)
401
401
  .then(function (res) {
402
+ var _a;
402
403
  if (res.ok)
403
404
  return resolve(res.json());
405
+ if ((_a = res.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('application/json'))
406
+ return res.json().then(reject).catch(reject);
404
407
  throw res;
405
408
  })
406
- .catch(function (e) { return reject(e); });
409
+ .catch(reject);
407
410
  })];
408
411
  });
409
412
  });
@@ -1048,7 +1051,7 @@ var definitions$1 = {
1048
1051
  minLength: 0,
1049
1052
  maxLengthWithSpaceType: {
1050
1053
  "default": 10000,
1051
- turbo: 20000
1054
+ turbo: 40000
1052
1055
  }
1053
1056
  },
1054
1057
  discussion: {
@@ -389,11 +389,14 @@ var Client = /** @class */ (function () {
389
389
  return [2 /*return*/, new Promise(function (resolve, reject) {
390
390
  fetch(address, init)
391
391
  .then(function (res) {
392
+ var _a;
392
393
  if (res.ok)
393
394
  return resolve(res.json());
395
+ if ((_a = res.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('application/json'))
396
+ return res.json().then(reject).catch(reject);
394
397
  throw res;
395
398
  })
396
- .catch(function (e) { return reject(e); });
399
+ .catch(reject);
397
400
  })];
398
401
  });
399
402
  });
@@ -1038,7 +1041,7 @@ var definitions$1 = {
1038
1041
  minLength: 0,
1039
1042
  maxLengthWithSpaceType: {
1040
1043
  "default": 10000,
1041
- turbo: 20000
1044
+ turbo: 40000
1042
1045
  }
1043
1046
  },
1044
1047
  discussion: {