*Update dist
This commit is contained in:
parent
fbaf4314f3
commit
51eabd809d
|
@ -1,7 +1,7 @@
|
|||
import { Client, factory } from "@lumeweb/libkernel-universal";
|
||||
import { MODULE } from "@lumeweb/kernel-swarm-client";
|
||||
import defer from "p-defer";
|
||||
import b4a from "b4a";
|
||||
import { Buffer } from "buffer";
|
||||
export default class Protomux {
|
||||
isProtomux = true;
|
||||
constructor(stream) {
|
||||
|
@ -137,13 +137,13 @@ class Message extends Client {
|
|||
if (data.args) {
|
||||
data.args = data.args.filter((arg) => {
|
||||
if (arg instanceof Uint8Array) {
|
||||
return b4a.from(arg);
|
||||
return Buffer.from(arg);
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
}
|
||||
if (data?.args && data?.args[0]?.buffer instanceof Uint8Array) {
|
||||
data.args[0].buffer = b4a.from(data.args[0].buffer);
|
||||
data.args[0].buffer = Buffer.from(data.args[0].buffer);
|
||||
}
|
||||
switch (data.action) {
|
||||
case "encode":
|
||||
|
|
Loading…
Reference in New Issue