Compare commits
No commits in common. "5eeee8bff8db2e82cb121b9bf2750b66aad9c6f8" and "a53c238889b7671f62a20b2582f3e35ec4c08e0e" have entirely different histories.
5eeee8bff8
...
a53c238889
|
@ -134,16 +134,8 @@ class Message extends Client {
|
|||
onmessage: !!this.onmessage,
|
||||
},
|
||||
}, async (data) => {
|
||||
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);
|
||||
if (data?.args && data?.args[0] instanceof Uint8Array) {
|
||||
data.args[0] = b4a.from(data.args[0]);
|
||||
}
|
||||
switch (data.action) {
|
||||
case "encode":
|
||||
|
|
|
@ -12,10 +12,5 @@
|
|||
"@types/b4a": "^1.6.0",
|
||||
"prettier": "^2.8.7",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"pnpm": {
|
||||
"patchedDependencies": {
|
||||
"b4a@1.6.3": "patches/b4a@1.6.3.patch"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
14
src/index.ts
14
src/index.ts
|
@ -216,18 +216,8 @@ class Message extends Client {
|
|||
},
|
||||
},
|
||||
async (data: any) => {
|
||||
if (data.args) {
|
||||
data.args = data.args.filter((arg: any) => {
|
||||
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);
|
||||
if (data?.args && data?.args[0] instanceof Uint8Array) {
|
||||
data.args[0] = b4a.from(data.args[0]);
|
||||
}
|
||||
switch (data.action) {
|
||||
case "encode":
|
||||
|
|
Loading…
Reference in New Issue