We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 067138e commit 4b4fd1aCopy full SHA for 4b4fd1a
Frontend/library/src/UeInstanceMessage/SendMessageController.ts
@@ -62,7 +62,6 @@ export class SendMessageController {
62
}
63
64
let byteLength = 0;
65
- const textEncoder = new TextEncoder();
66
// One loop to calculate the length in bytes of all of the provided data
67
messageData.forEach((element: number | string, idx: number) => {
68
const type = messageFormat.structure[idx];
@@ -91,7 +90,7 @@ export class SendMessageController {
91
90
// 2 bytes for string length
92
byteLength += 2;
93
// 2 bytes per characters
94
- byteLength += 2 * textEncoder.encode(element as string).length;
+ byteLength += 2 * (element as string).length;;
95
break;
96
97
});
0 commit comments