Explorar o código

Don't modify 'opts' parameter

Simon Detheridge %!s(int64=6) %!d(string=hai) anos
pai
achega
9d32d4ec16
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      services/filestore/app/js/GcsPersistor.js

+ 2 - 1
services/filestore/app/js/GcsPersistor.js

@@ -113,7 +113,8 @@ async function sendStream(bucketName, key, readStream, sourceMd5) {
   }
   }
 }
 }
 
 
-async function getFileStream(bucketName, key, opts = {}) {
+async function getFileStream(bucketName, key, _opts = {}) {
+  const opts = Object.assign({}, _opts)
   if (opts.end) {
   if (opts.end) {
     // S3 (and http range headers) treat 'end' as inclusive, so increase this by 1
     // S3 (and http range headers) treat 'end' as inclusive, so increase this by 1
     opts.end++
     opts.end++