diff --git a/.changeset/empty-ways-sparkle.md b/.changeset/empty-ways-sparkle.md new file mode 100644 index 000000000..46785e719 --- /dev/null +++ b/.changeset/empty-ways-sparkle.md @@ -0,0 +1,5 @@ +--- +"@telegram-apps/mate": patch +--- + +Use `Buffer.from` instead of `Buffer.concat` due to some problems related to monorepo typings. diff --git a/packages/mate/src/compress/compress.ts b/packages/mate/src/compress/compress.ts index bc587f0c4..42392e453 100644 --- a/packages/mate/src/compress/compress.ts +++ b/packages/mate/src/compress/compress.ts @@ -23,7 +23,7 @@ export function compress( let buffer = Buffer.from([]); stream.on('error', reject); stream.on('data', b => { - buffer = Buffer.concat([buffer, b]); + buffer = Buffer.from([...buffer, ...b]); }); stream.on('end', () => resolve(buffer)); });