Skip to content

Commit ec787c8

Browse files
fix(lint): remove unnecessary non-null assertion on Buffer index
1 parent 3a727bd commit ec787c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gateway/server/close-reason.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function truncateCloseReason(reason: string, maxBytes = CLOSE_REASON_MAX_
1919
// UTF-8 continuation bytes have the form 10xxxxxx; the start byte of a sequence
2020
// is any byte that is NOT a continuation byte (0x00–0x7F or 0xC0–0xFF).
2121
let end = maxBytes;
22-
while (end > 0 && (buf[end]! & 0xc0) === 0x80) {
22+
while (end > 0 && (buf[end] & 0xc0) === 0x80) {
2323
end--;
2424
}
2525
return buf.subarray(0, end).toString();

0 commit comments

Comments
 (0)