*Update dist

This commit is contained in:
Derrick Hammer 2023-04-09 00:17:50 -04:00
parent b8665d224a
commit 5eeee8bff8
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 10 additions and 2 deletions

12
dist/index.js vendored
View File

@ -134,8 +134,16 @@ class Message extends Client {
onmessage: !!this.onmessage,
},
}, async (data) => {
if (data?.args && data?.args[0] instanceof Uint8Array) {
data.args[0] = b4a.from(data.args[0]);
if (data.args) {
data.args = data.args.filter((arg) => {
if (arg instanceof Uint8Array) {
return b4a.from(arg);
}
return arg;
});
}
if (data?.args && data?.args[0]?.buffer instanceof Uint8Array) {
data.args[0].buffer = b4a.from(data.args[0].buffer);
}
switch (data.action) {
case "encode":