@flystorage/file-storage 0.1.5 → 0.1.7

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.
@@ -270,7 +270,7 @@ function normalizeExpiryToMilliseconds(expiresAt) {
270
270
  return expiresAt instanceof Date ? expiresAt.getTime() : expiresAt;
271
271
  }
272
272
  async function closeReadable(body) {
273
- if (body.closed) {
273
+ if (body.closed || body.destroyed) {
274
274
  return;
275
275
  }
276
276
  await new Promise((resolve, reject) => {
@@ -257,7 +257,7 @@ export function normalizeExpiryToMilliseconds(expiresAt) {
257
257
  return expiresAt instanceof Date ? expiresAt.getTime() : expiresAt;
258
258
  }
259
259
  export async function closeReadable(body) {
260
- if (body.closed) {
260
+ if (body.closed || body.destroyed) {
261
261
  return;
262
262
  }
263
263
  await new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flystorage/file-storage",
3
3
  "type": "module",
4
- "version": "0.1.5",
4
+ "version": "0.1.7",
5
5
  "description": "File-storage abstraction: multiple filesystems, one API.",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "types": "./dist/types/index.d.ts",