oakserver / oak

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
https://oakserver.org
MIT License
5.19k stars 233 forks source link

Uncaught TypeError if ServerSentEvent is created without optional EventInit #598

Closed KyleJune closed 1 year ago

KyleJune commented 1 year ago

Details can be found here: https://github.com/denoland/deno_std/issues/3355

Once the bug is fixed, the version of std used by oak will need updated to resolve the issue for oak.

KyleJune commented 1 year ago

The reason I didn't have this issue before on 12.0.0 was that the ServerSentEvent call signature required a body argument of type unknown and I happened to make it null. JSON.stringify will stringify null but won't stringify undefined.

KyleJune commented 1 year ago

This is fixed in std@0.186.0

kitsonk commented 1 year ago

std has been updated.