@webqit/fetch-plus 0.1.28 → 0.1.30

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
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "homepage": "https://fetch-plus.netlify.app/",
13
13
  "icon": "https://webqit.io/icon.svg",
14
- "version": "0.1.28",
14
+ "version": "0.1.30",
15
15
  "license": "MIT",
16
16
  "repository": {
17
17
  "type": "git",
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@webqit/observer": "^3.8.19",
37
- "@webqit/port-plus": "^0.1.21",
37
+ "@webqit/port-plus": "^0.1.22",
38
38
  "@webqit/url-plus": "^0.1.8"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@webqit/observer": "^3.8.19",
42
- "@webqit/port-plus": "^0.1.21",
42
+ "@webqit/port-plus": "^0.1.22",
43
43
  "@webqit/url-plus": "^0.1.8",
44
44
  "chai": "^4.3.4",
45
45
  "chai-as-promised": "^7.1.1",
@@ -115,12 +115,12 @@ export class HeadersPlus extends Headers {
115
115
  const range = rangeStr.trim().split('-').map((s) => s ? parseInt(s, 10) : null);
116
116
  range.resolveAgainst = (totalLength) => {
117
117
  const offsets = [...range];
118
- if (offsets[1] === null) {
118
+ if (typeof offsets[1] !== 'number') {
119
119
  offsets[1] = totalLength - 1;
120
120
  } else {
121
121
  offsets[1] = Math.min(offsets[1], totalLength) - 1;
122
122
  }
123
- if (offsets[0] === null) {
123
+ if (typeof offsets[0] !== 'number') {
124
124
  offsets[0] = offsets[1] ? totalLength - offsets[1] - 1 : 0;
125
125
  }
126
126
  return offsets;