Changed concat to push

This commit is contained in:
Ilya Borodin
2022-08-20 13:36:54 +03:00
committed by Adhiraj Singh
parent c76c2afa0c
commit 4f1d9492c5
3 changed files with 10 additions and 8 deletions

View File

@@ -330,12 +330,12 @@ export const extractSyncdPatches = async(result: BinaryNode) => {
export const downloadExternalBlob = async(blob: proto.IExternalBlobReference) => {
const stream = await downloadContentFromMessage(blob, 'md-app-state')
let buffer = Buffer.from([])
const bufferArray: Buffer[] = []
for await (const chunk of stream) {
buffer = Buffer.concat([buffer, chunk])
bufferArray.push(chunk)
}
return buffer
return Buffer.concat(bufferArray)
}
export const downloadExternalPatch = async(blob: proto.IExternalBlobReference) => {