diff --git a/client/src/app/core/core-services/websocket.service.ts b/client/src/app/core/core-services/websocket.service.ts index d4dcdd9d4..e89496a24 100644 --- a/client/src/app/core/core-services/websocket.service.ts +++ b/client/src/app/core/core-services/websocket.service.ts @@ -545,8 +545,10 @@ export class WebsocketService { * @param buffer - Buffer to convert * @returns String */ - private arrayBufferToString(buffer: ArrayBuffer): string { - return String.fromCharCode.apply(null, Array.from(new Uint16Array(buffer))); + private arrayBufferToString(buffer: Uint8Array): string { + return Array.from(buffer) + .map(code => String.fromCharCode(code)) + .join(''); } /**