diff options
Diffstat (limited to 'std/textproto/mod.ts')
-rw-r--r-- | std/textproto/mod.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/textproto/mod.ts b/std/textproto/mod.ts index 22153d17c..465753823 100644 --- a/std/textproto/mod.ts +++ b/std/textproto/mod.ts @@ -7,7 +7,7 @@ import { BufReader, UnexpectedEOFError } from "../io/bufio.ts"; import { charCode } from "../io/util.ts"; const asciiDecoder = new TextDecoder(); -function str(buf: Uint8Array): string { +function str(buf: Uint8Array | null | undefined): string { if (buf == null) { return ""; } else { @@ -82,7 +82,7 @@ export class TextProtoReader { throw new UnexpectedEOFError(); } else if (buf[0] == charCode(" ") || buf[0] == charCode("\t")) { throw new ProtocolError( - `malformed MIME header initial line: ${str(line!)}` + `malformed MIME header initial line: ${str(line)}` ); } @@ -142,7 +142,7 @@ export class TextProtoReader { const { line: l, more } = r; // Avoid the copy if the first call produced a full line. - if (!line! && !more) { + if (!line && !more) { // TODO(ry): // This skipSpace() is definitely misplaced, but I don't know where it // comes from nor how to fix it. |