mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:00:42 +00:00
fix(media): remove unnecessary non-null assertion flagged by oxlint
This commit is contained in:
committed by
Frank Yang
parent
9aaf63ef4c
commit
cb572783fb
@@ -98,7 +98,7 @@ const MB = 1024 * 1024;
|
||||
// Windows-1252 encoded files all pass.
|
||||
function looksLikeText(buffer: Buffer): boolean {
|
||||
for (let i = 0; i < buffer.length; i++) {
|
||||
const b = buffer[i]!;
|
||||
const b = buffer[i];
|
||||
// Reject null (0x00–0x08) and remaining C0 controls (0x0E–0x1F) and DEL (0x7F).
|
||||
if (b < 0x09 || (b >= 0x0e && b <= 0x1f) || b === 0x7f) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user