Skip to content

code-Update wasi.ts#28

Open
romashka-btc wants to merge 1 commit into0xPARC:mainfrom
romashka-btc:fix/err
Open

code-Update wasi.ts#28
romashka-btc wants to merge 1 commit into0xPARC:mainfrom
romashka-btc:fix/err

Conversation

@romashka-btc
Copy link

Fix: Replaced logical OR (||) with nullish coalescing operator (??)

Changes

  • Updated src/worker/wasi.ts:54 to use the nullish coalescing operator (??) for safer fallback handling.

    • Before:

      const contentType = response.headers.get("Content-Type") || "";
    • After:

      const contentType = response.headers.get("Content-Type") ?? "";

Purpose

  • Ensured safer fallback behavior by using the nullish coalescing operator, which only falls back for null or undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant