@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.
package/dist/cjs/file-storage.js
CHANGED
|
@@ -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) => {
|
package/dist/esm/file-storage.js
CHANGED
|
@@ -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