From 8efd2e71a9ae6026e286f1526c6f6c8b063566ab Mon Sep 17 00:00:00 2001 From: jackyalbo Date: Thu, 11 Apr 2019 12:30:09 +0300 Subject: [PATCH] A fix for files with no parts --- src/server/object_services/map_writer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/object_services/map_writer.js b/src/server/object_services/map_writer.js index 24ebdbfb3b..ba3b4e43b9 100644 --- a/src/server/object_services/map_writer.js +++ b/src/server/object_services/map_writer.js @@ -341,7 +341,7 @@ async function complete_object_multiparts(obj, multipart_req) { `multipart num=${num} etag=${etag} etag_md5_b64=${etag_md5_b64} not found in group ${util.inspect(group)}`); } md5.update(mp.md5_b64, 'base64'); - const mp_parts = parts_by_mp[mp._id]; + const mp_parts = parts_by_mp[mp._id] || []; _process_next_parts(mp_parts, context); used_multiparts.push(mp); // console.log('TODO GGG COMPLETE MULTIPART', JSON.stringify(mp));