Skip to content

Commit

Permalink
Merge pull request #11 from skgdev/bugfix/fix-buffer-to-enable-browse…
Browse files Browse the repository at this point in the history
…r-support

Fix encoding buffer to support browsers
  • Loading branch information
nmargaritis committed Apr 1, 2022
2 parents d2f625a + 481656d commit 3617b34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/encoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const buildEncoder = (options = {}) => {

encode(packet) {
const encoded = msgpack.encode(packet, this.options);
const buffer = Buffer.from(encoded);
const buffer = new Uint8Array(encoded);

return [buffer];
}
Expand Down

0 comments on commit 3617b34

Please sign in to comment.