I've just found that if I return NaN (unwittingly), it causes the entire response to become empty.
I've not looked at the Go source (and though I can probably read it, I've not programmed anything in anger with Go, so don't entirely trust myself), but my guess would be that the conversion is quietly failing and causes all data to be ejected.
I've just found that if I return
NaN
(unwittingly), it causes the entire response to become empty.I've not looked at the Go source (and though I can probably read it, I've not programmed anything in anger with Go, so don't entirely trust myself), but my guess would be that the conversion is quietly failing and causes all data to be ejected.
Here's how to replicate in a script.mjs:
Result:
If I wrap the return value in a serialise/deserialise then it works again (but only because
NaN
gets mapped tonull
).