From e322cd8729d7f862a313ce1ef74681bb4fc7412b Mon Sep 17 00:00:00 2001 From: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:35:51 +0200 Subject: [PATCH] Update uws.js --- src/uws.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uws.js b/src/uws.js index 0eccec16..e6a57707 100644 --- a/src/uws.js +++ b/src/uws.js @@ -32,7 +32,7 @@ module.exports.DeclarativeResponse = class DeclarativeResponse { _appendInstruction(opcode, ...text) { this.instructions.push(opcode); text.forEach(str => { - const bytes = (typeof data === 'string') ? new TextEncoder().encode(str) : str; + const bytes = (typeof str === 'string') ? new TextEncoder().encode(str) : str; this.instructions.push(bytes.length, ...bytes); }); }