Skip to content

Commit

Permalink
Merge pull request #525 from ugrinovsky/bugfix/mate-compress_types-fix
Browse files Browse the repository at this point in the history
fix(mate): buffer types fix
  • Loading branch information
heyqbnk authored Oct 31, 2024
2 parents b1c5567 + a5fd675 commit 40eebd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/empty-ways-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@telegram-apps/mate": patch
---

Use `Buffer.from` instead of `Buffer.concat` due to some problems related to monorepo typings.
2 changes: 1 addition & 1 deletion packages/mate/src/compress/compress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
Expand Down

0 comments on commit 40eebd7

Please sign in to comment.